GET /v1/user
Returns the caller’s own identity, read from the verified access-token claims. Profile fields (email, name, country) appear only when the token carries them.
Operation ID: getCurrentUser
Responses
| Status | Description |
|---|---|
200 |
The caller’s identity claims. |
401 |
Missing or invalid bearer token. |
429 |
Rate limit exceeded; retry after the Retry-After seconds. |
200 body
| Field | Type | Always present | Description |
|---|---|---|---|
sub |
string | yes | The token subject (the JWT sub): the user’s email, which auth.wego.com uses as the stable user identifier. |
scope |
string | no | Space-separated OAuth scopes granted to the token. |
email |
string | no | The user’s email address, when the token carries it. |
name |
string | no | The user’s full display name, when present. |
first_name |
string | no | The user’s given name, when present. |
last_name |
string | no | The user’s family name, when present. |
country_code |
string | no | The user’s market country code, when present (id_token-sourced; usually absent on the access token). |
uid |
string | number | no | The AS’s own numeric user id. Published as string | number because that is what it is: it arrives as a number today, and a string-only declaration would be a promise the API does not keep. |
principal_name |
string | no | The auth server’s principal name for the user, when present. |
Example
curl -s -H "Authorization: Bearer $TOKEN" \
"https://api.wego.com/v1/user"