Creates a streaming session. This endpoint is recommended for all new integrations.
Initiates a streaming session by creating a unique room at the WebRTC server for audio publishing and registers the connection at the WebSocket translation management API. The JWT access token received in the response should be used for both connecting to the WebRTC server and the WebSocket translation management API.
Notice, the JWT access token contains permissions, which may lead to restriction of several API functionalities.
Streaming session allows publishing RTC stream to the server, receiving translated audio stream, and managing translation options through WebSocket API.
References
Request Body |
---|
data object — REQUIREDsubscriber_count Subscriber token countPossible values: value ≤ 10 Number of subscriber tokens to generate. JWT used to connect to the WebRTC server and Translation management WebSocket API. | intent IntentPossible values: [api , broadcaster , desktop ] Intent of the session. Used for analytics and debugging purposes. |
|
Responses |
---|
201
Session created successfully. Schema — OPTIONAL |
---|
ok boolean | data objectStreaming session response data. Notice, address provided in the response example are placeholders and will differ in real response. publisher List of access token for publishers with RW permissionsJWT used to connect to the WebRTC server and Translation management WebSocket API. | subscriber string[]JWT used to connect to the WebRTC server and Translation management WebSocket API. | webrtc_room_name Room nameRoom name to join WebRTC server. | webrtc_url Stream URLStreaming API URL to publish a stream. | ws_url Control URLWebSocket API URL to manage translation options. | intent IntentPossible values: [api , broadcaster , desktop ] Intent of the session. Used for analytics and debugging purposes. | id Session IDPublisher session identifier. |
|
|
Schema — OPTIONAL |
---|
ok Ok — OPTIONALIndicates if the request was successful or not. | errors object[]type uriPossible values: 1 ≤ length ≤ 2083 A string containing a URI reference that identifies the problem type. | status StatusPossible values: 399 < value < 600 A number indicating the HTTP status code. | title TitlePossible values: 5 ≤ length A string containing a short, human-readable summary of the problem type. | detail DetailPossible values: 5 ≤ length A string containing a human-readable explanation specific to this occurrence of the problem. | instance InstancePossible values: 1 ≤ length A string containing a URI reference that identifies the specific occurrence of the problem. | error_code Error CodeA Number that indicates the error type that occurred. |
|
|