METHOD_UserUpdate

This method sends an update request to BEMS to retrieve the user's contact card.

BEMS response and notification

The following table describes the parameters that BEMS returns and the notification to send to the BlackBerry Connect app when users update the contact card information of a user in the Contact list.

Parameter

Type

Description

method

String

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

state String This parameter specifies the state of the request to BEMS (for example, Processing or Complete).
userData String This parameter displays the contact details in the BlackBerry Connect app.

Example code

The following example sends a request to BEMS to retrieve and update the user's contact card.

{
  "method":"UserUpdate",
  "params":{},
  "id":"c14",
  "jsonrpc":"2.0"
}

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

{
  "id":"c14",
  "error":null,
  "result":
   {
    "data":
     {
      "method":"UserUpdate",
        "state":"PROCESSING"
     }
   },
  "jsonrpc":"2.0",
  "background":false
}
If there are no errors, BEMS sends the following notification to the BlackBerry Connect app and updates the user's details.
{
  "id": "c4",
  "sequence": 1018700100000078,
  "result": 
   {
    "data": 
    {
     "userData": 
      {
       "uri":"sip:janedoe@example.com",
       "email":"jdoe@example.com",
       "personalMessage":"I am available now",
       "displayName":"Jane Doe",
       "title":"",
       "workPhone":"",
       "mobilePhone":"",
       "availability":"3500",
       "presence":"Available",
       "isAllowedToShowPhoto":true,
       "photoHash":null,
       "groups":[
           {
            "groupId":1,
            "name":"Team building",
            "subgroups":[]
           },
           {
            "groupId":2,
            "name":"Pinned Contacts",
            "subgroups":[]
           },
            .....           
          ],
          "containerId":"0",
          "container":"default",
          "type":"self",
          "numDevices":"1"
         },
        "method":"UserUpdate",
        "state":"COMPLETE"
      }
     },
    "jsonrpc":"2.0"
}