Fetch Sessions
Overview
The Fetch Sessions API returns all the active sessions in an SFU App.
Authentication
You must provide bearer token in the Authorization header. The bearer token in the secret of the SFU App that you have created in the dashboard. When you create an SFU app, you will get the SFU App Id and the Secret.
- Header:
Authorization: Bearer {secret}
HTTP Request
GET
https://global.sfu.metered.ca/api/sfu/:sfu_app_id/sessions
URL Parameters
Parameter Name | Type | Description |
---|---|---|
sfu_app_id | string | The unique identifier of your SFU app. This parameter is required to specify which SFU app the session should be created for. You can find the SFU app ID in the dashboard after creating the SFU app. |
Response
In the response you will get the array of active peerConnection sessions.
[
{
"connectionState": "connected",
"metadata": "",
"sessionId": "session-101-0b324a40-a203-474c-a58e-6db8c27d2eb8",
"sfuAppId": "66ad57c7f9a530a04920b5cf"
}
]