METHOD_PC_GetRoomParticipants
This method sends a request to
BEMS
to retrieve a list of the participants in the group discussion that the user has joined. The following table describes the parameters that you can include in this method.
Parameter | Type | Required | Description |
---|---|---|---|
roomId | String | √ | This parameter specifies the ID of the group discussion rooms that you want to retrieve the participant list for. |
The following table describes the parameters that
BEMS
returns and the notifications to send to the BlackBerry Connect
app when users request the participant list.Parameter | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
participants | Participant Array | This parameter specifies an array of participants items in the group discussion:
|
Code example
The following example sends a request to
BEMS
to return the participants list for a group discussion.{ "method":"pc.GetRoomParticipants", "params": { "roomID":"ma-chan://gems.example.com/25ac15e7-9bff-4e78-9261-6e08aa43231e" }, "id":"c5", "jsonrpc":"2.0" }
If the request is successful,
BEMS
sends the following response to the BlackBerry Connect
app and processes the request.{ "id":"c5", "error":null, "result": { "data": { "method":"pc.GetRoomParticipants", "state":"PROCESSING" } }, "jsonrpc":"2.0" }
If there are no errors,
BEMS
sends the following notification to the BlackBerry Connect
app and displays the participants in the group discussion. In this example, the participant names, display names, and SIP addresses are displayed for the specified room ID. { "id":"c5", "error":null, "result": { "data": { "method":"pc.GetRoomParticipants", "participants": [ { "name":"user1", "displayName": "User 1", "id":"sip:user1@example.com" }, { "name":"user2", "displayName": "User 2", "id":"sip:user2@example.com" }, ] } }, "jsonrpc":"2.0" }