Skip to main content

Create a session

Endpoint

POST /api/v1/session

HeaderValue
X-AppEnvIdYour AppEnv Id
AuthenticationApiKey [Your client API key]

Payload

JSON object with session options.

OptionRequiredDefaultDescription
participantsfalse1Number of possible users joining the stream
immediatefalsetrueIf set to false enables waiting for a session if currently no renderer is available

Response

Fields of importance

FieldDescription
renderer.specs.publicDomainNameHostname of the streaming instance, used for control connections
mainConnection.connectionKeyConnection key for the streaming session, needed when integrating in backend
Sample response
{
"id": "57b40c9d-aa94-423e-86e6-be51399d9f84",
"type": "session",
"renderer": {
"rendererId": "9ecc0e1d-df2f-4691-a279-fc3c3b798c4b",
"ip": "34.147.105.8",
"specs": {
"rendererControlPath": "ws",
"turnServer": "turns-34-147-105-8.renderer.uc-streaming.com",
"region": "europe-west4-c",
"publicDomainName": "streaming-34-147-105-8.renderer.uc-streaming.com",
"Port": "443",
"useRendererControl": "True",
"appVersion": "1.1.2",
"MachineId": "instance-633cd7ba-0110-4638-aa9c-bc2a7b0499ba"
}
},
"expiration": "2023-02-23T14:00:50.3803441Z",
"mainConnection": {
"connectionKey": "19eb84e6-3e96-4bdb-b65d-55af8c372853"
},
"secondaryConnections": [
{
"connectionKey": "b27a28cd-9aeb-46c1-8a3f-b389d1f2f920",
"connectionCode": 12345
},
{
"connectionKey": "d1557502-9446-430e-9f0b-74c330858d55",
"connectionCode": 54321
},
]
}

Possible Response Codes

Response Status CodeDescription
200Session created, response contains session information
401Invalid or missing API key
403Wrong API key for AppEnv
503No session available