Poll for CLI device token
POST
/v1/device/token
Request Body required
application/jsonpoll_token
string
REQUIRED
Responses
200
Pending or authorized state
application/jsonOne of:
Option 1
status
string
Enum:
pendinginterval
integer
expires_in
integer
Option 2
status
string
Enum:
authorizedapi_key
string
key_id
string
user_id
string
400
Error response
410
Error response
429
Error response
curl -X POST 'https://screenframed.com/v1/device/token' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "poll_token": "string"}'
const response = await fetch('https://screenframed.com/v1/device/token', { method: 'POST', headers: { "Authorization": "Bearer YOUR_API_TOKEN", "Content-Type": "application/json" }, body: JSON.stringify({ "poll_token": "string" })});const data = await response.json();console.log(data);
import requestsheaders = { 'Authorization': 'Bearer YOUR_API_TOKEN'}response = requests.post('https://screenframed.com/v1/device/token', headers=headers, json={ "poll_token": "string"})print(response.json())
200
Response
{ "status": "pending", "interval": 123, "expires_in": 123}
API Playground
Try this endpoint
POST
/v1/device/token