Tools

Start a CLI login (device-code pairing)

How martini login obtains a key without a browser on the same machine. Creates a pairing request and returns a short code plus a poll token. The person opens verificationUrl in the signed-in Martini app, types the code, picks an organization or "as you" (an account key with no organization), and approves; the CLI polls GET /v1/cli/login/{pollToken} until it is handed a fresh mtn_cli_… key (90-day expiry). Send X-Martini-Client: martini-cli/<version> so the approval page offers only what that CLI can collect. No authentication: the CLI has none yet. Rate limited per client.

post/v1/cli/login

Request

  • Base URL: https://api.martini.film
  • URL: https://api.martini.film/v1/cli/login
  • Auth: none required

Request body

deviceLabelstring required

What the person will see when asked to approve: the machine name, and the host agent if any.

Response

The pairing request.

codestring required

The short code to type into the app, ABCD-EFGH. Never put it in a link.

pollTokenstring required

The secret that collects the key; poll GET /v1/cli/login/{pollToken} with it.

verificationUrlstring required

Where the person confirms the code (the signed-in app).

expiresAtstring required
intervalinteger required

Seconds to wait between polls.

Changes

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