Skip to content

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.

AuthSession or API token with the read scope
Token limited to projectsAccepted, 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"
  }
}
FieldDescription
roleType1 is the owner, 2 an admin, 3 a member, 0 a guest.
permissionsThe 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.
scopesThe token's scopes. Empty when the request was made with a session.

Errors

StatusWhen
401No token, a token that is invalid, expired or revoked, or no valid companyid header.
403The token lacks the read scope, or its person is no longer a member of the workspace.
429Too many requests from this address. Wait retryAfter seconds and send it again.

Released under the AGPL-3.0 licence.