Supercheck LogoSupercheck
CLI Tokens

Exchange an approved device code for a CLI key

POST
/api/auth/device/token

RFC 8628 device access token request. Poll no faster than the returned interval. On success a project-scoped CLI key (90-day expiry) is created and returned exactly once; a lost response cannot be recovered, revoke the unused key under CLI tokens and log in again.

Request Body

application/x-www-form-urlencoded
  1. body
grant_type*"urn:ietf:params:oauth:grant-type:device_code"
Value in"urn:ietf:params:oauth:grant-type:device_code"
client_id*"supercheck-cli"
Value in"supercheck-cli"
device_code*string

Response Body

Approved. Response is not cacheable (Cache-Control: no-store).

application/json
  1. response
access_token*string

Project-scoped CLI key (sck_live_*).

token_type*"Bearer"
Value in"Bearer"
expires_in*integer
context?

Non-secret user, organization and project the key belongs to.

Example Request
curl -X POST 'https://app.supercheck.io/api/auth/device/token' \  -H 'Content-Type: application/x-www-form-urlencoded' \  -d 'grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Adevice_code&client_id=supercheck-cli&device_code=string'
Example Response
{  "access_token": "string",  "token_type": "Bearer",  "expires_in": 0,  "context": {}}