Generate WebRTC Token
This endpoint allows you to generate token for WebRTC channel.
Authorizations:
Request Body schema:
application/jsonidentity 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. | ||
| |||
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
Success
Bad Request
Unauthorized
Forbidden
Internal Server Error
Request samples
- Payload
- cURL
- Java
- C#
- Go
- Python
- PHP
- JavaScript
- NodeJs
- Ruby
{- "identity": "Alice",
- "displayName": "Alice in Wonderland",
- "capabilities": {
- "recording": "ALWAYS"
}, - "timeToLive": 43200
}
Response samples
- 200
- 400
- 401
- 403
- 500
{- "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZGVudGl0eSI6IkFsaWNlIiwibmFtZSI6IkFsaWNlIGluIFdvbmRlcmxhbmQiLCJleHAiOjE1NzkyOTA2MzgsImNhcHMiOlsyXX0.QyCMqjH8DsftChibW2Rw4EByH-eEviUp3-kHVKuJpKg",
- "expirationTime": "2020-01-17T19:50:38.488589Z"
}
Need assistance
Encountering issues
What's new? Check out
Unsure about a term? See