Skip to main content
POST
Create a widget token

Authorizations

Authorization
string
header
required

Wavix API key. Pass as Authorization: Bearer <api_key>. Keys support per-resource scopes (none / read / write). See Restricted keys and scopes.

Body

application/json

Attributes for the new widget token.

sip_trunk
string
required

Name of the SIP trunk the token authenticates against.

Example:

"my-sip-trunk"

ttl
integer | null
required

Time to live in seconds. Pass null for no expiration.

Required range: x >= 1
Example:

3600

payload
object | null

Arbitrary client-defined data to associate with the token.

Example:

Response

Returns the created widget token.

token
string
required

Signed JWT used by the Wavix embeddable widget to authenticate.

Example:

"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."

uuid
string
required

Unique identifier of the WebRTC token.

Example:

"550e8400-e29b-41d4-a716-446655440000"

sip_trunk
string
required

Name of the SIP trunk the token authenticates against.

Example:

"my-sip-trunk"

payload
object | null

Arbitrary client-defined data associated with the token.

Example:
ttl
integer | null

Lifetime of the token, in seconds. null means the token does not expire.

Example:

3600