Skip to main content

Fetch Tracks

Overview

The Fetch Tracks API fetch the array of tracks for the provided sessionId.

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/session/:session_id/tracks
Parameter NameTypeDescription
sfu_app_idstringThe 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.
session_idstringThe unique identifier of the session. This parameter is required to specify which session the tracks should be fetched from.

Response

In the response you will get the array of active tracks.

[
{
"sessionId": "session-101-7d61f484-7397-4ea4-931a-72d7b350165d",
"sfuAppId": "66ad57c7f9a530a04920b5cf",
"trackId": "33f140fc-c7c8-4ab7-a011-ce3773158135",
"customTrackName": "userA-video",
"mid": "1",
"trackKind": "video"
},
{
"sessionId": "session-101-7d61f484-7397-4ea4-931a-72d7b350165d",
"sfuAppId": "66ad57c7f9a530a04920b5cf",
"trackId": "a1b2c3d4-e5f6-7g8h-9i0j-k11l12m13n14",
"customTrackName": "userB-audio",
"mid": "2",
"trackKind": "audio"
}
]