Skip to content
This page is available in Markdown format. Markdown is recommended for AI consumption. See /api/user/get-current-user/index.md for this page, or/llms.txt for the full documentation index.

Get the authenticated user

Returns the caller's own identity, read from the verified access-token claims.

View as MarkdownView this page as plain text
Carries onwardterminal
Settlesimmediately
Id expiresno

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"

FORM WG-REF · SEQ 004821The API and the ways in to it are early and may change.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close