The /self
endpoint of the Disguise Cloud API returns information about the authenticated user and its tokens. This endpoint is duplicated on the Drive API to allow easy validation of the API token.
The response from the /self
endpoint includes the following fields:
Field | Description |
---|---|
id | The unique identifier of the user. |
name | The full name of the user. |
first_name | The first name of the user. |
last_name | The last name of the user. |
The email address of the user. | |
tokens | A list of API tokens associated with the user, see below. |
The tokens
field is an array of token objects, each with the following fields:
Field | Description |
---|---|
id | The unique identifier of the token. Note this is NOT the access token itself. |
name | The name of the token. |
last_used_at | The last time the token was used. |
curl -X GET https://drive-api.disguise.cloud/v1/self \
-H "Authorization: Token YOUR_API_TOKEN"
A successful response will return a 200 OK
status code and the following JSON:
{
"id": "5ab6448f-72e2-4fd7-8929-2e9c94bff342",
"name": "Jane Doe",
"first_name": "Jane",
"last_name": "Doe",
"email": "jane.doe@example.com",
"tokens": [
{
"id": "765f1c9f-a031-4a52-a2bf-194a89023798",
"name": "SampleToken",
"last_used_at": "2024-11-30T15:45:00.000000Z"
}
]
}