Exchange a device code for an API key
Check a device sign-in with the device_code from the create endpoint. Poll every 5 seconds (at most 30 requests per minute for each device code and 60 per minute for each IP address) until the status is no longer pending. Sign-ins started by the Sevalla MCP server, and device codes created with a callback_url, also need the approval_secret the dashboard adds to the callback URL, so only the browser that approved can collect the key. When the user has approved, this call creates the API key with the company and permissions the user picked and returns it once. After that the code is gone and later calls return expired.
Body
The one-time secret the dashboard adds to the callback URL after the user approves. Required for sign-ins started by the Sevalla MCP server and for device codes created with a callback_url: without it their status stays pending. Device codes without a callback, such as the typed-code sign-in of the Sevalla CLI, do not need it
1"Zq8vN2mXc4rT7yWb1kLp9sHd3fJg6uEa0oRiQtYxS5w"
Response
Default Response
Current status of the device code. pending - waiting for the user, approved - the user approved and token is included, denied - the user rejected the request, expired - the code expired, was already used or does not exist
pending, approved, denied, expired "pending"