Poll device auth
POST
/api/v1/auth/device/token
const url = 'https://app.ayna.com/api/v1/auth/device/token';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"device_code":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://app.ayna.com/api/v1/auth/device/token \ --header 'Content-Type: application/json' \ --data '{ "device_code": "example" }'Poll for device authorization result. Returns credentials when authorized.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
DeviceTokenPayload
object
device_code
required
Device Code
Device code from start response
string
Example generated
{ "device_code": "example"}Responses
Section titled “Responses”OK
Media typeapplication/json
Response
object
key
additional properties
any
Example generated
{}