API ReferenceDevice auth
Get token by device auth
Exchanges the device token and returns the access token once the user has authorized the device.
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/api/device/token" \ -H "Content-Type: application/json" \ -d '{ "deviceCode": "string" }'{ "success": true, "data": { "accessToken": "eyJhbGci...", "tokenType": "Bearer", "expiresIn": 604799, "scope": [ "account", "challenges" ] }}Start device auth POST
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).
Remove a friend DELETE
Removes an existing friendship with the specified user. Triggers the `friend:removed` ws event to the target user.