channels
webrtc-calls
webrtc
webrtc-token

Generate WebRTC Token

This endpoint allows you to generate token for WebRTC channel.

post/webrtc/1/token

Request

  • Base URL
    https://api.infobip.com (the document declares no server; this is the origin it was published from)
  • Auth
    • API key in header Authorization
    • or API key in header Authorization
    • or HTTP basic
    • or OAuth 2
      Client credentials
      Token URL: https://api.infobip.com/auth/1/oauth2/token

Request body

identitystring required

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 -, _, ..

displayNamestring

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.

timeToLiveinteger

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.

Response

Success

tokenstring

The access token used to connect client SDKs to Infobip WebRTC platform.

expirationTimestring

Time point until which token is valid. The default value is 8h. If it expires, the user must be provided with the new valid token in order to continue using Infobip WebRTC platform. There is no notification about token expiry, you must track that by yourself.

Example response

{
  "expirationTime": "2022-05-01T14:25:55.123Z"
}

Changes

No recorded changes to this operation across all 1 revision of this API.