Skip to main content
GET
/
api
/
public
/
v1
/
auth
/
me
curl -sS https://app.opentrain.ai/api/public/v1/auth/me \
  -H "Authorization: Bearer $OT_API_TOKEN"
{
  "actor": {
    "userId": "<USER_ID>",
    "email": "owner@example.com",
    "firstName": "Mira",
    "lastName": "Chen",
    "fullName": "Mira Chen",
    "userType": "EMPLOYER"
  },
  "token": {
    "id": "<TOKEN_ID>",
    "label": "ci-runner",
    "scopes": ["jobs:read", "jobs:write", "proposals:read", "payments:read"],
    "ownerOrganizationId": null
  },
  "account": {
    "kind": "employer_organization",
    "organizationId": "<ORGANIZATION_ID>",
    "ownerUserId": "<USER_ID>",
    "memberRole": "OWNER"
  }
}
Returns the principal behind the bearer token: who the actor is, what the token can do, and which account context it operates in. The natural first call of any session — use it to confirm the token works and to discover your scopes before probing capabilities. Requirements: any valid token — no specific scope.

Request

No parameters.

Response

actor
object
The user behind the token.
token
object
The authenticating token.
account
object
The account context requests operate in.

Errors

StatuscodeMeaning
401UNAUTHORIZEDMissing, invalid, expired, or revoked token
404NOT_FOUNDThe token’s user no longer exists
curl -sS https://app.opentrain.ai/api/public/v1/auth/me \
  -H "Authorization: Bearer $OT_API_TOKEN"
{
  "actor": {
    "userId": "<USER_ID>",
    "email": "owner@example.com",
    "firstName": "Mira",
    "lastName": "Chen",
    "fullName": "Mira Chen",
    "userType": "EMPLOYER"
  },
  "token": {
    "id": "<TOKEN_ID>",
    "label": "ci-runner",
    "scopes": ["jobs:read", "jobs:write", "proposals:read", "payments:read"],
    "ownerOrganizationId": null
  },
  "account": {
    "kind": "employer_organization",
    "organizationId": "<ORGANIZATION_ID>",
    "ownerUserId": "<USER_ID>",
    "memberRole": "OWNER"
  }
}