Harthelm Docs

Approve a CLI sign-in

Browser sessions only (403 with an API key): the user confirms in the console that the sign-in is theirs. The CLI then redeems it for a new API key of the approving user (`POST /cli/logins/{login}/token`). For a loopback sign-in the response names the CLI's local callback, which the console navigates to; it carries no secret.

Generated from openapi/harthelm.yaml at v1.5.0
POST
/me/cli-logins/{code}/approve

Authorization

cookie__Host-harthelm_session<token>

Browser session of the UI (12 h idle, 7 days absolute). State-changing requests also need the header Harthelm-CSRF: 1 and a matching Origin.

Path Parameters

code*string

The user code hart login printed, e.g. BDFH-KMNP (case and the dash do not matter).

Length8 <= length <= 9

Response Body

Approved.

application/json
  1. response
redirect_url?string

loopback only: http://127.0.0.1:<redirect_port>/callback; the console navigates there.

curl -X POST 'https://console.example.com/api/v1/me/cli-logins/stringst/approve'
{  "redirect_url": "string"}