Session

Note: The Legacy API (V1) will remain fully functional. However, we recommend you use our new API to leverage the new functionalities and features and stay up to date with future releases; you can continue to check the docs for the Legacy API (V1)s here.

Overview

Session is a single continuous call in a room. To allow users to join a 100ms video conferencing session inside your app, you first need to create a room. A single room can have multiple sessions. You will need a management token as a bearer token for your requests.

Get Session Data using API

You can query session data using API.

GETGet Session API
curl --location --request GET 'https://api.100ms.live/v2/sessions?room_id=61652b404e556e35f2179759' -H 'Authorization: Bearer {{management_token}}'

Headers

NameValueRequired
Authorization
Bearer <management token>Yes

URL Parameters

NameTypeDescriptionRequired
id
stringID of the session if known.No
room_id
stringRoom ID of the session if known.No
active
boolSession is currently going on or not.No
before
timeTimestamp before(inclusive) which session is created in RFC3339 format for example 2022-02-09T05:53:23.375Z.No
after
timeTimestamp after(inclusive) which session is created in RFC3339 format for example 2022-02-09T05:53:23.375Z.No
limit
intNumber of sessions returned by response. Range 10-20No
start
stringID of the session after which to start the response. Sessions are returned in decreasing IDs or created_at timestamp.No

Response

NameTypeDescriptionRequired
limit
intNumber of sessions the API tried to find. If returned array has lesser number of results, only those number were found.No
data
arrayArray of sessions or null if no session was found.No
last
ObjectIDSessions are returned in decreasing IDs or created_at timestamp. Last represent the earliest session returned by the response.No

How to calculate session duration

You can calculate additional information from session data using given information. Redundant information like peer duration/ session duration is not provided since they can be calculated from provided response. You can calculate peer duration by subtracting joined_at timestamp from left_at for a given peer. Similarly you can calculate session duration by adding all peers' duration.


Have a suggestion? Recommend changes ->

Run in postman

Was this helpful?

1234