Skip to main content
GET/gate/whoami

Get Current User

Returns the identity record of the currently authenticated end-user, including their eu_-prefixed ID, email, assigned roles (such as PROJECT_END_USER), and group memberships.

Requires a valid Gate-issued end-user JWT.

Parameters
projectSlug *path

The project's slug: the path segment after @.

It is unique within the org.

Responses
HTTPK9O CodeDescription
200Success
401K9O_SESSION_EXPIREDThe session token is expired or has been revoked; sign in again to obtain a valid session.
404K9O_END_USER_NOT_FOUNDThe authenticated end-user record could not be found in this project.
Response body (200)
data *object

The end user.

id *string

The end user's id (eu_...).

email *string

The end user's email address.

An address given at sign-up is stored in lower case.

status *"active" | "locked" | "deleted"

The account's status.

A successful response always carries active: a locked or deleted account cannot sign in.

createdAt *string <date-time>

When the end user signed up.

updatedAt *any

When the account record last changed, or null if it never has.

One of: string <date-time>
or: null
lastSigninAt *any

When the end user last signed in with a password, or null if they never have (for example straight after sign-up).

One of: string <date-time>
or: null
roles *string[]

The end user's platform role.

Always ["PROJECT_END_USER"].

Roles you grant through end-user role grants are not listed here.

groups *string[]

Always an empty array in this response.

The end user's group names are carried in the access token's groups claim.

meta *any

Request metadata: cost, timing and the request and trace ids.

TypeScript
// const k9o = new K9o({ orgSlug: 'playground', projectSlug: 'storefront', apiKey: 'k9o_…' })
const { data } = await k9o.gate.whoami()

Showing example in TypeScript

Response example (200)
{
  "data": {
    "id": "string",
    "email": "string",
    "status": "active",
    "createdAt": "string",
    "updatedAt": "string",
    "lastSigninAt": "string",
    "roles": [
      "string"
    ],
    "groups": [
      "string"
    ]
  }
}

More in Sign-in & Sessions