Identity
Who a token is, and what that person may do.
Who am I
GET /api/v2/api-tokens/me · stable
Returns the person and the workspace behind the token, with that person's role and permissions.
Call it once after connecting, to check that the token and the companyid header are right.
| Auth | Session or API token with the read scope |
| Token limited to projects | Accepted, and held to its projects |
Request
http
GET /api/v2/api-tokens/me
Authorization: Bearer <token>
companyid: <company id>Response
json
{
"status": true,
"statusText": "Identity resolved.",
"data": {
"userId": "<user id>",
"companyId": "<company id>",
"name": "Sample Person",
"email": "person@example.com",
"timeZone": "Europe/London",
"roleType": 3,
"permissions": { "task.task_list": true, "task.task_create": true, "project.project_create": null },
"scopes": ["read", "write"],
"tokenName": "Reporting script"
}
}| Field | Description |
|---|---|
roleType | 1 is the owner, 2 an admin, 3 a member, 0 a guest. |
permissions | The person's workspace-wide answer for the permission keys the server checks most: true may change, false may only read, null has no access, and 1 or 2 mean "own" or "everyone" on the keys that take a choice. A project with its own rules can answer differently. |
scopes | The token's scopes. Empty when the request was made with a session. |
Errors
| Status | When |
|---|---|
| 401 | No token, a token that is invalid, expired or revoked, or no valid companyid header. |
| 403 | The token lacks the read scope, or its person is no longer a member of the workspace. |
| 429 | Too many requests from this address. Wait retryAfter seconds and send it again. |
