Skip to main content
GET
/
user
Get user information
curl --request GET \
  --url https://{subdomain}.auth.{region}.nhost.run/v1/user \
  --header 'Authorization: Bearer <token>'
{
  "avatarUrl": "https://myapp.com/avatars/user123.jpg",
  "createdAt": "2023-01-15T12:34:56Z",
  "defaultRole": "user",
  "displayName": "John Smith",
  "email": "john.smith@nhost.io",
  "emailVerified": true,
  "id": "2c35b6f3-c4b9-48e3-978a-d4d0f1d42e24",
  "isAnonymous": false,
  "locale": "en",
  "metadata": {
    "firstName": "John",
    "lastName": "Smith"
  },
  "phoneNumber": "+12025550123",
  "phoneNumberVerified": false,
  "roles": [
    "user",
    "customer"
  ],
  "activeMfaType": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication with JWT access token. Used to authenticate requests to protected endpoints.

Response

User information

User profile and account information

avatarUrl
string
required

URL to the user's profile picture

Example:

"https://myapp.com/avatars/user123.jpg"

createdAt
string<date-time>
required

Timestamp when the user account was created

Example:

"2023-01-15T12:34:56Z"

defaultRole
string
required

Default authorization role for the user

Example:

"user"

displayName
string
required

User's display name

Example:

"John Smith"

emailVerified
boolean
required

Whether the user's email has been verified

Example:

true

id
string
required

Unique identifier for the user

Example:

"2c35b6f3-c4b9-48e3-978a-d4d0f1d42e24"

isAnonymous
boolean
required

Whether this is an anonymous user account

Example:

false

locale
string
required

User's preferred locale (language code)

Required string length: 2
Example:

"en"

metadata
object
required

Custom metadata associated with the user

Example:
{ "firstName": "John", "lastName": "Smith" }
phoneNumberVerified
boolean
required

Whether the user's phone number has been verified

Example:

false

roles
string[]
required

List of roles assigned to the user

Example:
["user", "customer"]
email
string<email>

User's email address

Example:

"john.smith@nhost.io"

phoneNumber
string

User's phone number

Example:

"+12025550123"

activeMfaType
string | null

Active MFA type for the user

I