Skip Navigation

METHOD_DeclineChat

Use this method to decline a chat request from a user.
The following table describes the parameters that you can include in this method. 
Parameter
Type
Required
Description
requestId
String
This parameter specifies the requestId from the InvitationReceived server notification. 
dependencies
String
This parameter specifies the other methods that this method is dependent on. It specifies the comma delimited dependent request IDs.
reconnect
String
This parameter specifies that the 
BlackBerry Connect
 app re-establish the existing session. For example, if 
BlackBerry Connect
 goes to the background, when it comes to the foreground the same session is continued. 

BEMS
 response and notification

The following table describes the parameters that 
BEMS
 returns and the notification to send to the 
BlackBerry Connect
 app when a chat invitation is declined.
Parameter
Type
Description
state
String
This parameter specifies the state of the request to 
BEMS
 (for example, Processing or Complete). 
method
String
This parameter specifies the method invocation name (for example, DeclineChat).

Code example

The following example sends a request to 
BEMS
 to decline a chat request.
{ "method":"DeclineChat", "params": { "requestId":"dbc2e7b6-25e8-450e-9670-c9e4f32341bb" }, "id":"c5", "jsonrpc":"2.0" }
If the decline request is successful, 
BEMS
 sends the following response to the 
BlackBerry Connect
 app and processes the request.
{ "id":"c5", "error":null, "result": { "data": { "method":"DeclineChat", "state":"PROCESSING" } }, "jsonrpc":"2.0" "background": true }
If there are no errors, 
BEMS
 sends the following notification to the 
BlackBerry Connect
 app and the declines the chat request. 
{ "id":"c5", "sequence":1018552300000042, "result": { "data": { "method":"DeclineChat", "state":"COMPLETE" } }, "jsonrpc":"2.0" }