API ReferenceDevice auth
Start device auth
Initiates a device auth flow by generating a device code and user code.
It's not an OAuth 2.0 Device Authorization Grant, as this doesn't follow the format, but it's pretty similar to it.
Triggers the device_auth ws event once the user denies/accepts the device auth request (or it expires).
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/api/device/init" \ -H "Content-Type: application/json" \ -d '{ "scopes": [ "account" ] }'{ "success": true, "data": { "deviceCode": "4krOEOckwOYmrnNLMC01HoHfIdDcIbRLpNXHtpUp", "userCode": "AN23B5", "verificationUri": "https://chessnow.angelcmh.com/device", "verificationUriComplete": "https://chessnow.angelcmh.com/device?code=AN23B5", "expiresIn": 300, "interval": 5 }}Deny a challenge POST
Declines a pending incoming challenge. This updates the challenge status to declined. Doesn't create a match. Triggers the `challenge:denied` ws event to the target user.
Get token by device auth POST
Exchanges the device token and returns the access token once the user has authorized the device.