Skip to content

Collect the API key (device token)

POST
/v1/agent/device/token
curl --request POST \
--url https://api.ringingbytes.com/v1/agent/device/token \
--header 'Content-Type: application/json' \
--data '{ "device_code": "example", "grant_type": "example", "client_id": "example" }'

RFC 8628 token request. No authentication. Until the person decides: HTTP 400 with error = authorization_pending (keep polling every interval seconds), slow_down (add 5 seconds), access_denied, expired_token, or invalid_grant (unknown code, or the key was already returned: it is returned once). On approval: the organization’s new API key. Accepts JSON or form encoding.

Media typeapplication/json
object
device_code
required
string
>= 1 characters <= 200 characters
grant_type

urn:ietf:params:oauth:grant-type:device_code (optional).

string
client_id
string
<= 200 characters

Example generated

{
"device_code": "example",
"grant_type": "example",
"client_id": "example"
}

OK

Media typeapplication/json
object
access_token
required

The API key (shown once).

string
token_type
required
Allowed value: Bearer
scope
required

The granted scopes, space-separated (RFC 6749).

string
api_key
required

The API key again, under a plain name.

string
key_id
required
string
organization_id
required
string
scopes
required
Array<string>
Allowed values: checks:create account:read billing:checkout
free_checks_remaining
required
number
monthly_cap_usd
required

This key’s monthly cap on billed usage, chosen by the person; null = none.

Any of:
number
account_url
required
string
docs_url
required
string

Example

{
"token_type": "Bearer",
"scopes": [
"checks:create"
]
}