Skip to content

Authorize a Revolut profile.

Synopsis

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

Options

Argument or flagTypeRequiredDefaultDescription
--codestringyes for non-interactive exchange-Authorization code returned by Revolut.
--expected-statestringyes for non-interactive exchange-OAuth state value the caller expected.
--received-statestringyes for non-interactive exchange-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.

Without --code, the CLI generates an OAuth state value, asks the public C API for the provider authorization URL, opens the default browser, and waits on the loopback redirect URI configured on the profile. The redirect must be an http://localhost:<port>/... or http://127.0.0.1:<port>/... URL. If the browser cannot be opened, the command returns an error with the non-interactive exchange shape and does not print the authorization URL.

With --code, all three non-interactive fields are required. The CLI passes --expected-state and --received-state to the public C API exchange request; the exchange fails if they differ.

JSON output never includes access tokens, refresh tokens, private keys, client assertions, or authorization URLs.

Requirements

  • Profile: required
  • Credential type: Revolut OAuth client certificate/private key plus OAuth code
  • Backend prerequisites: Revolut profile
  • Input mode: Browser loopback redirect, or explicit non-interactive 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
gln --profile rev profile auth login revolut `
  --code oa_sand_xxx `
  --expected-state expected-state `
  --received-state expected-state

See also