Skip to content

Latest commit

 

History

History
58 lines (39 loc) · 1.6 KB

AccountApi.md

File metadata and controls

58 lines (39 loc) · 1.6 KB

Flat\APIClient\AccountApi

All URIs are relative to https://api.flat.io/v2

Method HTTP request Description
getAuthenticatedUser GET /me Get current user profile

getAuthenticatedUser

\Flat\APIClient\Model\UserDetails getAuthenticatedUser()

Get current user profile

Get details about the current authenticated User.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
$config = Flat\APIClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Flat\APIClient\Api\AccountApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);

try {
    $result = $apiInstance->getAuthenticatedUser();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->getAuthenticatedUser: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

This endpoint does not need any parameter.

Return type

\Flat\APIClient\Model\UserDetails

Authorization

OAuth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]