Approve a CLI authorization
const url = 'https://api.aetherpush.com/v1/cli/authorizations/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/approve';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.aetherpush.com/v1/cli/authorizations/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/approve \ --header 'Authorization: Bearer <token>'Binds the request to the signed-in account and, for the loopback flow, arms a 60-second authorization code. The response never contains a credential: the browser only learns where to send the code.
When the account has MFA and the dashboard session is older than the
freshness window, this answers 403 with code reauth_required. The
page should send the user back through sign-in and return here.
When the account passed its two-factor setup deadline with MFA still
off, this answers 403 with code mfa_setup_required and no credential
is ever minted for it.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Responses
Section titled “Responses”Approved.
object
Present for pkce only. The browser navigates here to hand the
CLI its authorization code. Carries the code and state, never a
credential.
Example
{ "status": "approved", "mode": "pkce", "redirectUri": "http://127.0.0.1:49152/callback?code=rGYPU1M&state=u8Kq3rN1sVx2"}The bearer token is missing, invalid, or expired.
object
Human-readable error message.
Unique identifier for the request, also exposed as the X-Request-Id response header.
Example
{ "error": "The requested resource was not found.", "requestId": "req_abc123"}API keys and named access keys receive a plain 403. A login session
that is not a dashboard login session receives code
dashboard_session_required; an old session receives
reauth_required; and an account past its two-factor setup deadline
receives mfa_setup_required.
object
Human-readable error message.
Unique identifier for the request, also exposed as the X-Request-Id response header.
Returned after login-session validation when a valid session that is
not a dashboard login session tries to issue or widen an API key,
create an access key or change its lifetime, enrol a passkey or
authenticator app, start a passkey step-up challenge, or run the CLI
device ceremony. Endpoints that enforce both guards reject API keys and
named access keys earlier with a plain 403 response and no code.
API-key creation applies only the dashboard-session guard, so any
non-dashboard credential receives this response there. Listing,
renaming and revoking stay open to any login session. Sessions created
before the credential_origin column existed cannot be attributed to
the dashboard and are also refused; signing out and back in fixes that.
object
Returned when the account has MFA and the dashboard session is too old
to authorize a new device. Modelled on the login challenge response so
clients can branch on code rather than on message text.
object
Returned when the account passed its two-factor setup deadline and asks
for a new credential. Same shape as the reauth response so clients can
branch on code rather than on message text.
object
Example
{ "error": "The requested resource was not found.", "requestId": "req_abc123"}No pending request with that id.
object
Human-readable error message.
Unique identifier for the request, also exposed as the X-Request-Id response header.
Example
{ "error": "The requested resource was not found.", "requestId": "req_abc123"}The request stopped being pending before the approval landed.
object
Human-readable error message.
Unique identifier for the request, also exposed as the X-Request-Id response header.
Example
{ "error": "The requested resource was not found.", "requestId": "req_abc123"}Internal server error.
object
Human-readable error message.
Unique identifier for the request, also exposed as the X-Request-Id response header.
Example
{ "error": "The requested resource was not found.", "requestId": "req_abc123"}