Get my user​
Returns the full user object of the authenticated user including the profile, email, phone, etc
Responses
- 200
- default
A successful response.
application/json
application/grpc
application/grpc-web+proto
Schema
Example (from schema)
Schema
user object
lastLogin date-time
The timestamp of the last successful login
{
"user": {
"id": "69629023906488334",
"details": {
"sequence": "2",
"creationDate": "2024-05-24T19:39:26.478Z",
"changeDate": "2024-05-24T19:39:26.478Z",
"resourceOwner": "69629023906488334"
},
"state": "USER_STATE_UNSPECIFIED",
"userName": "gigi-giraffe",
"loginNames": [
"gigi@zitadel.com",
"gigi@zitadel.zitadel.ch"
],
"preferredLoginName": "gigi@zitadel.com",
"human": {
"profile": {
"firstName": "Gigi",
"lastName": "Giraffe",
"nickName": "gigi-giraffe",
"displayName": "Gigi Giraffe",
"preferredLanguage": "en",
"gender": "GENDER_UNSPECIFIED",
"avatarUrl": "https://api.zitadel.ch/assets/v1/avatar-32432jkh4kj32"
},
"email": {
"email": "gigi@zitadel.com",
"isEmailVerified": true
},
"phone": {
"phone": "+41 71 000 00 00",
"isPhoneVerified": true
}
},
"machine": {
"name": "zitadel",
"description": "The one and only IAM",
"hasSecret": "true",
"accessTokenType": "ACCESS_TOKEN_TYPE_BEARER"
}
},
"lastLogin": "2024-05-24T19:39:26.478Z"
}
Schema
Example (from schema)
Schema
user object
lastLogin date-time
The timestamp of the last successful login
{
"user": {
"id": "69629023906488334",
"details": {
"sequence": "2",
"creationDate": "2024-05-24T19:39:26.479Z",
"changeDate": "2024-05-24T19:39:26.479Z",
"resourceOwner": "69629023906488334"
},
"state": "USER_STATE_UNSPECIFIED",
"userName": "gigi-giraffe",
"loginNames": [
"gigi@zitadel.com",
"gigi@zitadel.zitadel.ch"
],
"preferredLoginName": "gigi@zitadel.com",
"human": {
"profile": {
"firstName": "Gigi",
"lastName": "Giraffe",
"nickName": "gigi-giraffe",
"displayName": "Gigi Giraffe",
"preferredLanguage": "en",
"gender": "GENDER_UNSPECIFIED",
"avatarUrl": "https://api.zitadel.ch/assets/v1/avatar-32432jkh4kj32"
},
"email": {
"email": "gigi@zitadel.com",
"isEmailVerified": true
},
"phone": {
"phone": "+41 71 000 00 00",
"isPhoneVerified": true
}
},
"machine": {
"name": "zitadel",
"description": "The one and only IAM",
"hasSecret": "true",
"accessTokenType": "ACCESS_TOKEN_TYPE_BEARER"
}
},
"lastLogin": "2024-05-24T19:39:26.479Z"
}
Schema
Example (from schema)
Schema
user object
lastLogin date-time
The timestamp of the last successful login
{
"user": {
"id": "69629023906488334",
"details": {
"sequence": "2",
"creationDate": "2024-05-24T19:39:26.481Z",
"changeDate": "2024-05-24T19:39:26.481Z",
"resourceOwner": "69629023906488334"
},
"state": "USER_STATE_UNSPECIFIED",
"userName": "gigi-giraffe",
"loginNames": [
"gigi@zitadel.com",
"gigi@zitadel.zitadel.ch"
],
"preferredLoginName": "gigi@zitadel.com",
"human": {
"profile": {
"firstName": "Gigi",
"lastName": "Giraffe",
"nickName": "gigi-giraffe",
"displayName": "Gigi Giraffe",
"preferredLanguage": "en",
"gender": "GENDER_UNSPECIFIED",
"avatarUrl": "https://api.zitadel.ch/assets/v1/avatar-32432jkh4kj32"
},
"email": {
"email": "gigi@zitadel.com",
"isEmailVerified": true
},
"phone": {
"phone": "+41 71 000 00 00",
"isPhoneVerified": true
}
},
"machine": {
"name": "zitadel",
"description": "The one and only IAM",
"hasSecret": "true",
"accessTokenType": "ACCESS_TOKEN_TYPE_BEARER"
}
},
"lastLogin": "2024-05-24T19:39:26.481Z"
}
An unexpected error response.
application/json
application/grpc
application/grpc-web+proto
Schema
Example (from schema)
Schema
code int32
message string
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Schema
Example (from schema)
Schema
code int32
message string
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Schema
Example (from schema)
Schema
code int32
message string
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
GET /users/me
Authorization
name: OAuth2type: oauth2scopes:openid
flows: { "authorizationCode": { "authorizationUrl": "$CUSTOM-DOMAIN/oauth/v2/authorize", "tokenUrl": "$CUSTOM-DOMAIN/oauth/v2/token", "scopes": { "openid": "openid" } } }
Request
Request
curl / cURL
curl -L -X GET 'https://$CUSTOM-DOMAIN/auth/v1/users/me' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'
python / requests
curl -L -X GET 'https://$CUSTOM-DOMAIN/auth/v1/users/me' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'
go / native
curl -L -X GET 'https://$CUSTOM-DOMAIN/auth/v1/users/me' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'
nodejs / axios
curl -L -X GET 'https://$CUSTOM-DOMAIN/auth/v1/users/me' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'
ruby / Net::HTTP
curl -L -X GET 'https://$CUSTOM-DOMAIN/auth/v1/users/me' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'
csharp / RestSharp
curl -L -X GET 'https://$CUSTOM-DOMAIN/auth/v1/users/me' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'
php / cURL
curl -L -X GET 'https://$CUSTOM-DOMAIN/auth/v1/users/me' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'
java / OkHttp
curl -L -X GET 'https://$CUSTOM-DOMAIN/auth/v1/users/me' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'
powershell / RestMethod
curl -L -X GET 'https://$CUSTOM-DOMAIN/auth/v1/users/me' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'