METHOD_UnblockContact

This method notifies BEMS that the user is unblocking a contact on the BlackBerry Connect app contacts list.

Parameter

Type

Required

Description

contactId

String

√
This parameter specifies the ID of the user to unblock. Users can unblock other users that are a part of their contact list and users that are not a part of the contact list.
Note: When you unblock another user, the user that initiates the unblock starts to receive ContactUpdate notifications for the previously blocked user. If the user has other active sessions with the user blocked, they won't receive ContactUpdates for the user in those sessions. The user can get the blocked user's status by searching for their contact details.
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 the user unblocks a contact in the contact list.

Parameter

Type

Description

method

String

This parameter specifies the invoked method (for example, UnblockContact).

state String This parameter specifies the state of the request to BEMS (for example, Processing or Complete).

Code example

The following code example sends a request to BEMS to unblock "user33" in the contact list.

{
  "id":"c12",
  "method":"UnblockContact",
  "params": 
    {
      "contactIds":{"user33@example.com}"
    },
  "jsonrpc":"2.0"
}

If the request is successful, BEMS sends the following response to the BlackBerry Connect app and processes the request.

{
   "id":"c12",
   "error":null,
   "result": {
       "data":
        {
          "method":"UnblockContact",
          "state":"PROCESSING"
        }
      },
   "jsonrpc":"2.0",
   "background":false
 }
If there are no errors, BEMS sends the following notification to the BlackBerry Connect app and the contact is unblocked.
{
   "id":"c12",
   "sequence":1018699900000077,
   "result": {
       "data":
        {
          "method":"UnblockContact",
          "state":"COMPLETE"
        }
      },
   "jsonrpc":"2.0",
 }