Me
Returns the user tied to the access token making the request.
When to use
Call this to verify that your token works and to see which user and Tenant your integration operates as. It takes no arguments and has no side effects, which makes it the standard connectivity check after setup — Getting started uses it as the first call.
Required roles
None. Any valid access token can call Me — see Authentication.
Operation
query GetCurrentUser {
Me {
_id
userId
email
first_name
last_name
status
default_tenant {
_id
name
}
}
}
Arguments
Me takes no arguments. It always returns the user tied to the token in the Authorization header.
Response
| Field | Type | Description |
|---|---|---|
_id | ID | The user's unique ID. |
userId | ID | User ID — usually the email address. |
email | String | The user's registered email address. |
first_name | String | First name. |
last_name | String | Last name. |
status | String | User status: registered, active, inactive, or deleted. |
default_tenant | TenantReference | The Tenant the user operates under by default. Request _id and name to identify it. |
Example
- Request
- Success
- Error
query GetCurrentUser {
Me {
_id
userId
email
first_name
last_name
status
default_tenant {
_id
name
}
}
}
Variables:
{}
{
"data": {
"Me": {
"_id": "user_abc123",
"userId": "integration@example.com",
"email": "integration@example.com",
"first_name": "Acme",
"last_name": "Integration",
"status": "active",
"default_tenant": {
"_id": "tenant_abc123",
"name": "Acme Corporation"
}
}
}
}
{
"errors": [
{
"message": "Token validation failed",
"extensions": { "code": "UNAUTHENTICATED" }
}
],
"data": null
}
Error cases
| Code | Cause | Resolution |
|---|---|---|
UNAUTHENTICATED | Token missing or expired | Request a new token — see Authentication |
See also
- Getting started — uses
Meas the first call - Authentication