Skip to content

Mint Softphone Token

GET
/dialer/sessions/token

CONTACTS NOBODY - but the RESPONSE CAN. Mints a softphone credential.

Returns a short-lived (1 hour) Twilio access token carrying a VoiceGrant, for a browser running the Twilio Voice SDK. Whoever holds it can register a device and place and receive calls as sdr_{user_id}_{org} until it expires. TREAT THE RESPONSE AS A SECRET: it is a bearer credential, not a description of one.

That is why this is the one GET on this router tiered external instead of read, and why it gates on voice:calls:place rather than a read permission - a read-only key must not be able to mint the ability to dial.

user_id is REQUIRED here although voice defaults it. An organisation API key has no user of its own, and defaulting would mint a credential for an identity nobody named. The organisation half of the identity is always the key’s own and cannot be supplied.

Authorizations

Parameters

Query Parameters

user_id
required

The rep this softphone credential is for.

string

The rep this softphone credential is for.

Header Parameters

X-Target-Org-Id
Any of:
string

Responses

200

Successful Response

object
data
required

An open envelope for one dialer result.

Open because voice owns the shape of a session, a call stub and a queue stat, and it grows them without a contract bump here. A dropped field would otherwise turn an added upstream field into a removed public one.

object
key
additional properties
any
pagination
Any of:
object
has_next
required

Whether there are more pages

boolean
limit
required

Items per page

integer
next_cursor
Any of:
string
page
required

Current page number (1-indexed)

integer
total
required

Total number of items

integer

422

Validation Error

object
detail
Array<object>
object
loc
required
Array
msg
required
string
type
required
string