List Peers

You can use this API for get the active peers in the room. Peers can be filtered by specifying user_id or role in the query params. If no peers match the filtering criteria response will have an empty peers list.

GEThttps://api.100ms.live/v2/active-rooms/<room_id>/peers
curl --location --request GET 'https://api.100ms.live/v2/active-rooms/<room_id>/peers' \ --header 'Authorization: Bearer <management_token>'
RESPONSE
Status: 200 OK
{ "peers": { "dcd88eb0-83e6-486a-bcae-c3be5e0f2c20": { "id": "dcd88eb0-83e6-486a-bcae-c3be5e0f2c20", "name": "John", "user_id": "student-3461", "metadata": "", "role": "student", "joined_at": "2023-01-25T12:06:34.080990401Z" }, "4e03dce3-ddec-4bdd-b91b-0b18be1a7f10": { "id": "4e03dce3-ddec-4bdd-b91b-0b18be1a7f10", "name": "Nick", "user_id": "teacher-81", "metadata": "", "role": "teacher", "joined_at": "2023-01-25T12:04:30.366388779Z" } } }

Allowed filters

NameTypeDescriptionRequired
user_id
stringDetermines the peers with specified user_id (your internal user identifier used while creating the auth token for peers)No
role
stringDetermines the peers with specified roleNo

Why would you use this API?


Have a suggestion? Recommend changes ->

Run in postman

Was this helpful?

1234