Skip to main content
POST
/
api
/
auth
/
device
/
token
Exchange device code for token
curl --request POST \
  --url https://app.photon.codes/api/auth/device/token \
  --header 'Content-Type: application/json' \
  --data '
{
  "grant_type": "urn:ietf:params:oauth:grant-type:device_code",
  "device_code": "<string>",
  "client_id": "<string>"
}
'
{
  "session": {},
  "user": {}
}

Body

application/json
grant_type
enum<string>
required
Available options:
urn:ietf:params:oauth:grant-type:device_code
device_code
string
required
client_id
string
required

Response

User has approved. Session is returned; the set-auth-token response header carries the bearer token to use for subsequent calls.

session
object
user
object