User
Get User Information
API Documentation
Backend Services
- Authentication
- Email and Password
- Passwordless
- OAuth
- WebAuthn
- Anonymous
- MFA
- User
- POSTSign Out
- Storage
GraphQL
- AI
Client Libraries
- JavaScript
- React
- Next.js
- Vue
User
Get User Information
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": false,
"id": "2c35b6f3-c4b9-48e3-978a-d4d0f1d42e24",
"isAnonymous": false,
"locale": "en",
"metadata": {
"firstName": "John",
"lastName": "Smith"
},
"phoneNumber": "<string>",
"phoneNumberVerified": false,
"roles": [
"me",
"user"
]
}
Authorizations
JSON Web Token to authorize requests.
Response
200
application/json
User information
The response is of type object
.
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": false,
"id": "2c35b6f3-c4b9-48e3-978a-d4d0f1d42e24",
"isAnonymous": false,
"locale": "en",
"metadata": {
"firstName": "John",
"lastName": "Smith"
},
"phoneNumber": "<string>",
"phoneNumberVerified": false,
"roles": [
"me",
"user"
]
}