Remove Peer
POST {{HOST}}/v2/active-rooms/:room_id/remove-peers
You can use this API to remove/disconnect a connected peer from an active room. 100ms provides options to disconnect a peer either with their peer_id or role. Note: Conditional Arguments You should define either of these arguments (peer_id or role) in the payload for the request to be successful.
peer_id
is specified -- respective connected peer will be disconnected from the active room.role
is specified -- all the connected peers assigned with that particular role will be disconnected from the active room.peer_id
and role
are specified -- preference will be given to the peer_id and the respective peer will be disconnected from the active room.peer_id
and role
are not specified -- you must specify peer_id or role for this request.Arguments
Name
Type
Description
Required
room_id
— path paramstring
Unique identifier of the room to which the peer is connected.
Example: 627cda81ab4f3b56a077dc33Yes
peer_id
— body paramstring
Unique identifier of the connected peer/participant you wish to remove from the active room.
Example: fd9e87d8-5c7b-4750-932f-d8d2ff18b70bConditional
role
— body paramstring
You can use this to remove a list of connected peers with the specified role type from the active room.
Conditional
reason
— body paramstring
You can specify the message to be passed to other connected peers in the active room.
No
Why would you use this API?
Body
PARAM
Key | Datatype | Required | Description |
HEADERS
Key | Datatype | Required | Description |
RESPONSES
status
ENDPOINTS