Generate WebRTC Token

This endpoint allows you to generate token for WebRTC channel.

Please log in to see full path URL. Learn why.
post
/webrtc/1/token
Request Body schema:
application/json
collapse all -
identity
required
string ^[\p{L}\p{N}\-_+=/.]{3,64}$

The identity used to present user on Infobip WebRTC platform. Must be unique. Must contain at least 3 and at most 64 unicode characters including -, _, ..

displayName
string

Optional. A human-readable name for a given identity. Does not have to be unique. If set, it will be presented to all other users communicating with the identified user, along with identity. Must contain at least 5 and at most 50 characters.

capabilities
object
Deprecated

Optional. The object containing permission for certain actions during the session.

recording
string
Deprecated
Enum: "ALWAYS" "ON_DEMAND" "DISABLED"

Whether to allow recording calls during the session. Possible values are ALWAYS, ON_DEMAND and DISABLED. If want to set ALWAYS or ON_DEMAND, the capability must be enabled on account level (please contact your account manager for this).

timeToLive
integer <int64>

Optional. This field represents a number of seconds until the token expires. If not set, the token will last 8 hours. The maximum value is 24 hours.

Responses

200

Success

400

Bad Request

401

Unauthorized

403

Forbidden

500

Internal Server Error

Request samples

Content type
application/json
Copy
Collapse all
{
  • "identity": "Alice",
  • "displayName": "Alice in Wonderland",
  • "capabilities":
    {
    • "recording": "ALWAYS"
    },
  • "timeToLive": 43200
}

Response samples

Content type
application/json
Copy
Collapse all
{
  • "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZGVudGl0eSI6IkFsaWNlIiwibmFtZSI6IkFsaWNlIGluIFdvbmRlcmxhbmQiLCJleHAiOjE1NzkyOTA2MzgsImNhcHMiOlsyXX0.QyCMqjH8DsftChibW2Rw4EByH-eEviUp3-kHVKuJpKg",
  • "expirationTime": "2020-01-17T19:50:38.488589Z"
}

Encountering issues

Contact our support

What's new? Check out

Release Notes

Unsure about a term? See

Glossary

Research panel

Help shape the future of our products
Learn more
Service status

Copyright @ 2006-2025 Infobip ltd.