logo
OpenapiAuth

Start a device-authorization login

API Docs with browser client
POST
/auth/oauth/device/start

Begin a device-authorization login: creates a pending request and returns a browser confirmation URL plus a token to poll for the result.

Authorization

headerx-api-key<token>

Request Body

application/json
  1. body

Input used to begin a device-authorization login.

client?

Optional metadata about the client requesting access.

clientId?string

Identifier of the requesting client. Known ids render as a verified client on the confirm page; unknown ids are allowed but shown as unverified.

Length1 <= length <= 128
variant?"headless"

Device-authorization variant. Reserved for future flows (e.g. a typed user_code); currently only the headless capability-URL variant is supported.

Default"headless"
Value in"headless"
codeChallenge*string

PKCE S256 code challenge: BASE64URL(SHA256(codeVerifier)).

Match^[A-Za-z0-9_-]{43}$
codeChallengeMethod*unknown

PKCE challenge method; only S256 is supported.

Response Body

OK

application/json
  1. response

Details required to drive a device-authorization login.

authReqToken*string

Opaque handle for this login request; used to poll status.

Formatuuid
confirmUrl*string

Browser URL where the user approves or cancels the request.

Formaturi
expiresAt*string

ISO timestamp after which the request can no longer be used.

Formatdate-time
pollIntervalMs*integer

Suggested delay between consecutive status calls.

Range-9007199254740991 <= value <= 9007199254740991
Example Request
curl -X POST 'https://example.com/v4/auth/oauth/device/start' \  -H 'Content-Type: application/json' \  -d '{  "codeChallenge": "string",  "codeChallengeMethod": "S256"}'
Example Response
{  "authReqToken": "2d8c8d17-3354-49f8-9a0d-976ce43b3e16",  "confirmUrl": "http://example.com",  "expiresAt": "2019-08-24T14:15:22Z",  "pollIntervalMs": -9007199254740991}