API keys
Poll a key request
Public. pending until the user approves, then approved with the key, once. denied and expired are terminal. If the claim response was lost, poll again with revokeClaimed: true to revoke the key you never received.
POST
/v1/keys/pollPublic. No API key needed.
Request body
application/json
| Field | Type | Description |
|---|---|---|
deviceCoderequired | string | |
revokeClaimed | boolean |
Responses
200The request's state.
400Invalid body.
404Unknown device code.
429Rate limited: 60 requests a minute per address. Carries Retry-After.
200 response body
| Field | Type | Description |
|---|---|---|
statusrequired | enum | One of: pending, approved, claimed, denied, expired |
apiKey | string |
Example
curl -X POST https://api.raylight.app/v1/keys/poll \ -H "Content-Type: application/json" \ -d '{ "deviceCode": "1aSs9fWUrhEUu3hOo5TzSJfWDgradXEK_k9BIV67XV8" }'