Skip to content

Exchange a Revolut OAuth authorization code for stored profile token state.

Synopsis

gln [global-options] profile auth login revolut
    --code <code> --expected-state <state> --received-state <state>

Options

Argument or flagTypeRequiredDefaultDescription
--codestringyes-Authorization code returned by Revolut.
--expected-statestringyes-OAuth state value the caller expected.
--received-statestringyes-OAuth state value received with the authorization code.

Description

Opens the active Revolut profile through the public C API and completes the OAuth authorization-code exchange. All three fields are required together. The CLI passes --expected-state and --received-state to the public C API exchange request; the exchange fails if they differ.

The CLI command does not open a browser or wait for a redirect. Product hosts such as Kontur own the browser authorization flow and collect the full callback URL containing code and state.

JSON output never includes access tokens, refresh tokens, or authorization URLs.

Requirements

  • Profile: required
  • Credential type: Provisioned Revolut product credential profile plus OAuth code
  • Backend prerequisites: Revolut profile and Galanthus-owned secure token storage
  • Input mode: explicit code and state input.

Status and exit codes

StatusExitMeaningContinuation
ok0OAuth exchange completed and status returned.-
error1Profile, redirect, state, or provider failure.-

Result keys: have_token, expires_at_unix_ms, needs_refresh, scope, last_error

Examples

gln --profile rev profile auth login revolut `
  --code oa_sand_xxx `
  --expected-state expected-state `
  --received-state expected-state

See also