Identity API

Whoami

GET /whoami

Get details about the current authenticated entity used to access the API.

Example

curl  -H 'Authorization: Bearer <token>' \
      -H 'Accept: application/json' \
      https://api.dnsimple.com/v2/whoami

Response

Responds with HTTP 200. Either user or account may be nil, depending on how you are authenticated.

Example when authenticated with an Account access token
{
  "data": {
    "user": null,
    "account": {
      "id": 1,
      "email": "example-account@example.com"
    }
  }
}
Example when authenticated with an User access token
{
  "data": {
    "user": {
      "id": 1,
      "email": "example-user@example.com"
    },
    "account": null
  }
}