All URIs are relative to https://box.example.com/admin
Method | HTTP request | Description |
---|---|---|
getMe | GET /me | Get user information |
\MailInABoxAPI\Client\Model\MeResponse getMe()
Get user information
Returns user information. Used for user authentication. Authenticate a user by supplying the auth token as a base64 encoded string in format email:password
using basic authentication headers. If successful, a long-lived api_key
is returned which can be used for subsequent requests to the API.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = MailInABoxAPI\Client\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new MailInABoxAPI\Client\Api\UserApi(
// 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->getMe();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UserApi->getMe: ', $e->getMessage(), PHP_EOL;
}
?>
This endpoint does not need any parameter.
\MailInABoxAPI\Client\Model\MeResponse
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]