Discovery

Exchange an approved device code for an API key (device authorisation flow).

Poll this after starting a device authorisation. ⚠️ THIS ENDPOINT DOES NOT USE THE API's STANDARD ERROR ENVELOPE. It follows RFC 8628 instead, returning { error, error_description } with authorization_pending while the user has not yet approved, then invalid_grant, expired_token, access_denied, or invalid_request. Every other v1 route returns the common error object.

post/device/credential

Request

  • Base URL: https://docs.sleeperhit.studio/api/v1
  • URL: https://docs.sleeperhit.studio/api/v1/device/credential
  • Auth: HTTP bearer

Request body

device_codestring required

Response

A newly issued API key. The secret is returned ONCE.

access_tokenstring

Shown once and never retrievable again.

token_typestring
key_prefixstring
scopesstring[]
expires_atstring date-time nullable

When the key stops working: 90 days after the sign-in. Signing in again mints a new key with a fresh lifetime.

Example response

{
  "token_type": "bearer"
}

Changes

No recorded changes to this operation across all 2 revisions of this API.