Retrieve a specific peer

Retrieves the details of a specific peer in an active room. You can use the peer_id to retrieve the details of the peer. Use retrieve active room state API to get the list of connected peers in an active room.

Note: You can leverage this API to retrieve the details of connected peers in an active room only. To retrieve details of the peers that left the session already, use the Retrieve a specific session API

GEThttps://api.100ms.live/v2/active-rooms/<room_id>/peers/<peer_id>
curl --location --request GET 'https://api.100ms.live/v2/active-rooms/<room_id>/peers/<peer_id>' \ --header 'Authorization: Bearer <management_token>'
RESPONSE
Status: 200 OK
{ "id": "2e8fc83e-6aef-4ca8-9124-bedc253f3529", "name": "Johnny Appleseed", "user_id": "tutor_id_1234", "metadata": "{\"isHandRaised\":false}", "role": "backstage", "joined_at": "2022-10-06T05:22:41.635589462Z", "tracks": { "780a28e0-f2df-450b-9954-70307a440530": { "id": "780a28e0-f2df-450b-9954-70307a440530", "stream_id": "2cc4afed-20ba-4793-a223-d4c76c331456", "mute": false, "type": "video", "source": "regular", "started_at": "2022-10-06T05:22:41.752327705Z", "description": "" }, "d6831044-3584-42aa-92be-efd051cae353": { "id": "d6831044-3584-42aa-92be-efd051cae353", "stream_id": "2cc4afed-20ba-4793-a223-d4c76c331456", "mute": true, "type": "audio", "source": "regular", "started_at": "2022-10-06T05:22:41.752327705Z", "description": "" } } }

Arguments

NameTypeDescriptionRequired
room_id
— path param
stringUnique identifier of the room where the peer is active.

Example: 627cda81ab4f3b56a077dc33
Yes
peer_id
— path param
stringUnique identifier of the peer/participant you wish to fetch details for.

Example: 1038fa72-9345-4651-beab-436f9242ebf4
Yes

Why would you use this API?

  • To check if a specific peer has enabled/disabled their audio/video/screen-share at a given time in an active room.
  • To check if a specific peer is on-stage and backstage at a particular time.
  • You can also use this API to store peer metadata in your database and retrieve it for an abruptly disconnected peer once they join the session again. For example, to enable the user to resume playing the multiplayer game.

Have a suggestion? Recommend changes ->

Run in postman

Was this helpful?

1234