Skip to main content

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

FieldTypeDescription
_idIDThe user's unique ID.
userIdIDUser ID — usually the email address.
emailStringThe user's registered email address.
first_nameStringFirst name.
last_nameStringLast name.
statusStringUser status: registered, active, inactive, or deleted.
default_tenantTenantReferenceThe Tenant the user operates under by default. Request _id and name to identify it.

Example

query GetCurrentUser {
Me {
_id
userId
email
first_name
last_name
status
default_tenant {
_id
name
}
}
}

Variables:

{}

Error cases

CodeCauseResolution
UNAUTHENTICATEDToken missing or expiredRequest a new token — see Authentication

See also