Identity

Exchange A CLI Login Code

Used by the official CLI after browser sign-in at /cli/authorize (OAuth 2.0 authorization code with PKCE for native apps, RFC 8252). Returns an ordinary, revocable API credential. Codes are single use and expire after two minutes. Errors use the OAuth token error format.

post/cli/token

Request

  • Base URL: https://zeronoise.ai/api/v1
  • URL: https://zeronoise.ai/api/v1/cli/token
  • Auth: none required

Request body

grant_type'authorization_code' required
client_id'zeronoise-cli' required
codestring required
code_verifierstring required
redirect_uristring required

Response

New API credential. The secret is returned once and must not be logged.

access_tokenstring required
token_type'Bearer' required
expires_ininteger

Seconds until the key expires. Omitted when the user chose no expiry.

scopestring required

Space-separated granted scopes

Changes

No recorded changes to this operation across all 1 revision of this API.