GET
/
user
curl --request GET \
  --url https://local.auth.nhost.run/v1/user \
  --header 'Authorization: Bearer <token>'
{
  "activeMfaType": "totp",
  "avatarUrl": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "defaultRole": "user",
  "displayName": "John Smith",
  "email": "john.smith@nhost.io",
  "emailVerified": true,
  "id": "2c35b6f3-c4b9-48e3-978a-d4d0f1d42e24",
  "isAnonymous": true,
  "locale": "en",
  "metadata": {
    "firstName": "John",
    "lastName": "Smith"
  },
  "phoneNumber": "<string>",
  "phoneNumberVerified": true,
  "roles": [
    "me",
    "user"
  ]
}

Authorizations

Authorization
string
headerrequired

JSON Web Token to authorize requests.

Response

200 - application/json
activeMfaType
required

Multi-factor authentication type. A null value deactivates MFA

Available options:
totp
avatarUrl
string
required
createdAt
string
required
defaultRole
enum<string>
default: userrequired
Available options:
me,
user
displayName
string
required
email
string
required

A valid email

emailVerified
boolean
default: falserequired
id
string

Id of the user

isAnonymous
boolean
default: falserequired
locale
string
default: enrequired

A two-characters locale

metadata
object
required
phoneNumber
string
required
phoneNumberVerified
boolean
default: falserequired
roles
enum<string>[]
required
Available options:
me