API tokens
Preview

What a command-line sign-in is asking

Shows the person the sign-in a short code names, so they can tell it is theirs before they approve.

GET
/device-codes/{userCode}
cookiebetter-auth.session_token<token>

Better Auth session cookie. Production uses the __Secure- prefixed name.

userCode*string

The short code, in any case, with or without its dash.

Lengthlength <= 16

Response Body

The sign-in.

application/json
  1. response
userCode*string
clientName*string
requestedFrom*string

The address the sign-in was started from, as the server saw it. Shown so a person can tell a sign-in they did not start.

requestedBy*string

The client that started it, as it named itself (its User-Agent).

startedAt*string
Formatdate-time
expiresAt*string
Formatdate-time
status*string
Value in"pending""approved""denied""used""expired"
Example Request
curl -X GET 'https://wardn.example.com/api/v1/device-codes/string'
Example Response
{  "userCode": "string",  "clientName": "string",  "requestedFrom": "string",  "requestedBy": "string",  "startedAt": "2019-08-24T14:15:22Z",  "expiresAt": "2019-08-24T14:15:22Z",  "status": "pending"}