Skip to main content
POST
Poll a device sign-in for its key

Body

application/json

The device sign-in to poll.

device_code
string
required

The device_code from POST /v1/device/authorizations.

Response

The sign-in's state, with the key once it is approved.

A device sign-in's state. With approved, it carries a new test key (shown once), the app it belongs to and whether a sandbox app was claimed.

status
enum<string>
required
  • pending: the person has not finished; poll again after interval seconds.
  • approved: signed in; key is set. The device code is now used up.
  • denied: the person refused. Stop polling.
  • expired: the codes ran out or were already used. Start again.
Available options:
pending,
approved,
denied,
expired
interval
integer
required

Seconds to wait before the next poll.

Required range: x >= 1
key
string

approved only. A new API key (fk_test_...), shown once; store it as FLOW_MESSAGING_KEY in place of the sandbox key. When the sign-in claimed a sandbox app, that app's sandbox keys stop working as this key is handed out.

api_key
object

An API key's record. The key itself is shown once, at creation, and stored only as a hash.

account
object

A customer company. Holds the plan, billing and members. Every app belongs to one account.

app
object

One agent integration. Owns API keys (per mode), webhook endpoints and settings.

claimed
boolean

approved only. true when the sign-in claimed the app of the claim_token or key it was started with.

allowance
object

What the app may still send on the shared sandbox senders for free. Present only on apps that have one: apps made with POST /v1/sandbox/keys (anonymous, one allowance per app), and apps of people who signed in (signed_in, one allowance per person: every app the person owns or claimed draws on the same contacts and messages, so the counts here are the person's, over all those apps). Only messages your agent sends count, on the channels in channels; inbound messages are free. A contact counts once it joins an app on a sandbox sender, and keeps counting after it leaves. Sends past the allowance answer 403 permission with channel_code sandbox_allowance_used; a join past contacts.limit is refused in the chat.

user
object

The person who approved a device sign-in.