Skip to main content
POST
Approve a CLI login and issue an authorization code

Authorizations

Authorization
string
header
required

An OAuth 2.0 bearer token, sent as Authorization: Bearer <token>. This is the recommended way to authenticate.

Get one by exchanging a service account's access key pair at POST /v1/oauth/token with grant_type=client_credentials. It is the standard client-credentials grant, so any OAuth-aware library will obtain and refresh it for you.

Tokens last an hour by default. The same access key pair is separately your AWS SigV4 credential for the S3-compatible object endpoint, which speaks nothing else.

Body

application/json

A signed-in user approving a client, from the console's consent page.

client_id
string
required

The registered client being approved.

Example:

"basaltic-cli"

redirect_uri
string
required

Where to deliver the code. For the CLI this must be a loopback address with any port — http://127.0.0.1:<port>/... or http://[::1]:<port>/... (RFC 8252 section 7.3). localhost is refused: it is a name, and whatever resolves it decides where the code goes.

Example:

"http://127.0.0.1:53682/callback"

code_challenge
string
required

Base64url SHA-256 of the client's PKCE verifier, without padding.

Example:

"E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM"

code_challenge_method
enum<string>
required

S256 only. plain is refused rather than merely discouraged: whoever intercepts the code also saw the challenge, so a plain challenge protects nothing.

Available options:
S256
Example:

"S256"

organization_id
string<uuid>
required

Which organization the resulting session is scoped to. The user must be a member of it.

state
string

Opaque value echoed back on the redirect, unchanged. The client generated it and compares it on return.

Response

Where to send the browser next. The URL carries the authorization code, so treat it as a credential: it is single use, valid for five minutes, and must not be logged.

redirect_to
string
required

Send the browser here. The URL carries the authorization code and the state — treat it as a credential, and do not log it.

Example:

"http://127.0.0.1:53682/callback?code=...&state=..."