auth

Redeem a CLI paste code for a session token

The CLI submits the paste code the user typed in; on a match within the 5m window it receives the raw session token (single-use).

post/api/v0/auth/cli/redeem

Request

  • Base URL: https://api.harmont.dev
  • URL: https://api.harmont.dev/api/v0/auth/cli/redeem
  • Auth: none required

Request body

codestring required

The paste code shown by the SPA.

Example request

{
  "code": "K7P2QR9MX3WZ4NTV"
}

Response

The session token

tokenstring required

The raw session bearer token. Send it as Authorization: Bearer <token>.

Changes

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