/gate/whoamiGet 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.
| projectSlug * | path | The project's slug: the path segment after It is unique within the org. |
| HTTP | K9O Code | Description |
|---|---|---|
| 200 | Success | |
| 401 | K9O_SESSION_EXPIRED | The session token is expired or has been revoked; sign in again to obtain a valid session. |
| 404 | K9O_END_USER_NOT_FOUND | The authenticated end-user record could not be found in this project. |
| data * | object | The end user. |
| id * | string | The end user's id ( |
| 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 |
| 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 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 |
| meta * | any | Request metadata: cost, timing and the request and trace ids. |
// const k9o = new K9o({ orgSlug: 'playground', projectSlug: 'storefront', apiKey: 'k9o_…' })
const { data } = await k9o.gate.whoami()Showing example in TypeScript
{
"data": {
"id": "string",
"email": "string",
"status": "active",
"createdAt": "string",
"updatedAt": "string",
"lastSigninAt": "string",
"roles": [
"string"
],
"groups": [
"string"
]
}
}