Skip to content
OpenTrain AIOpenTrain AIOpenTrain AIDocs

Ask OpenTrain

Answers from the documentation, with sources.

What would you like to do with OpenTrain?

AI answers can be mistaken. Check the linked sources. Don’t include private account information.

Open app

DEVELOPER DOCUMENTATION

Get Current Account

Retrieve the authenticated actor, token scopes, and account context.

GET/api/public/v1/auth/me

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.

No parameters.

actorobject

The user behind the token.

actor fields
userIdstring

The actor’s user ID.

emailstring | null

The account email, if set. Unclaimed agent accounts have no email until a human claims them.

firstNamestring | null

First name, if set.

lastNamestring | null

Last name, if set.

fullNamestring | null

Convenience concatenation of first and last name.

userTypestring | null

The platform role, e.g. EMPLOYER.

tokenobject

The authenticating token.

token fields
idstring

Token ID — usable with DELETE /tokens/{tokenId}.

labelstring | null

The token’s name (e.g. "ci-runner", "Agent token (pre-claim)").

scopesstring[]

The token’s granted scopes. :write scopes imply the matching :read at enforcement time, but this list shows exactly what was granted.

ownerOrganizationIdstring | null

Organization the token is bound to, if any.

accountobject

The account context requests operate in.

account fields
kindstring

employer_organization when the actor belongs to an employer organization, otherwise personal.

organizationIdstring | null

The organization ID (null for personal).

ownerUserIdstring | null

The organization owner’s user ID (null for personal).

memberRolestring | null

The actor’s role in the organization, e.g. OWNER (null for personal).

StatuscodeMeaning
401UNAUTHORIZEDMissing, invalid, expired, or revoked token
404NOT_FOUNDThe token’s user no longer exists