User

Get the authenticated user

Changed on

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.

get/v1/user

Request

  • Base URL
    https://api.wego.com
  • Auth
    • OAuth 2
      Authorization codehttps://auth.wego.com/user-auth/v2/users/oauth/authorize
      Token URLhttps://auth.wego.com/user-auth/v2/users/oauth/token
    • or HTTP bearer
  • TypeScript
    A function with typed inputs. Its response is checked against the schema.

Response

The caller's identity claims.

substring required

The token subject (the JWT sub): the user's email, which auth.wego.com uses as the stable user identifier.

scopestring

Space-separated OAuth scopes granted to the token.

emailstring

The user's email address, when the token carries it.

namestring

The user's full display name, when present.

first_namestring

The user's given name, when present.

last_namestring

The user's family name, when present.

country_codestring

The user's market country code, when present (id_token-sourced; usually absent on the access token).

principal_namestring

The auth server's principal name for the user, when present.

Changes

    • warning

      added the new rates_require_hotel_search enum value to the response property for the response status

    • warning

      added the new rates_require_hotel_search enum value to the response property for the response status