disguise developers

Self

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.

Endpoints

GET
drive-api.disguise.cloud
/v1/self
Get details about the authenticated user and its tokens.

Response Structure

The response from the /self endpoint includes the following fields:

FieldDescription
idThe unique identifier of the user.
nameThe full name of the user.
first_nameThe first name of the user.
last_nameThe last name of the user.
emailThe email address of the user.
tokensA list of API tokens associated with the user, see below.

Token Object

The tokens field is an array of token objects, each with the following fields:

FieldDescription
idThe unique identifier of the token. Note this is NOT the access token itself.
nameThe name of the token.
last_used_atThe last time the token was used.

Response Example

curl -X GET https://drive-api.disguise.cloud/v1/self \
-H "Authorization: Token YOUR_API_TOKEN"

Success

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"
    }
  ]
}