Skip to main content
POST
/
webrtc
/
tokens
Generate a Wavix Embeddable Widget token
curl --request POST \
  --url https://api.wavix.com/v2/webrtc/tokens \
  --header 'Content-Type: application/json' \
  --data '{
  "sip_trunk": "my-sip-trunk",
  "payload": {},
  "ttl": 3600
}'
{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "uuid": "550e8400-e29b-41d4-a716-446655440000",
  "sip_trunk": "my-sip-trunk",
  "payload": {},
  "ttl": 3600
}

Authorizations

appid
string
query
required

An API key to authorize your request

Body

application/json

Widget token generation parameters

sip_trunk
string
required

SIP trunk name

Example:

"my-sip-trunk"

payload
object | null

Arbitrary data to be associated with the token

Example:
{}
ttl
integer | null

Time to live in seconds

Example:

3600

Response

Widget token generated successfully

token
string
required

Wavix Embeddable Widget token.

Example:

"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."

uuid
string
required

Token ID

Example:

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

sip_trunk
string
required

SIP trunk name

Example:

"my-sip-trunk"

payload
object | null

Arbitrary data associated with the token

Example:
{}
ttl
integer | null

Time to live, in seconds

Example:

3600

I