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

Authentication

Get an OAuth2 bearer token for the Wego API, two ways.

Updated
View as MarkdownView this page as plain text
For humans

All /v1 operations require an OAuth2 bearer token from the Wego auth server. Two ways in, both against the auth endpoints declared in the spec’s securitySchemes.

Wego CLI

The easiest path. wego login runs the browser flow for you and stores the token locally; every CLI command then calls the API as you. See Wego CLI.

Any OAuth2 client

Run the OAuth2 authorization code flow with PKCE against the Wego auth server, then send the access token as Authorization: Bearer <token> (RFC 6750).

Field Value
Authorize URL https://auth.wego.com/user-auth/v2/users/oauth/authorize
Token URL https://auth.wego.com/user-auth/v2/users/oauth/token
Client ID 251815b9647317f4895122fd4924b7d44541d8fcc27be528435e3ad9bbf7e1ee (public, PKCE)
Redirect URI A loopback address you listen on, e.g. http://127.0.0.1:<port>/callback (RFC 8252)
PKCE S256
Scopes openid profile users
Navigation

Type to search…

↑↓ navigate↵ selectEsc close