Skip Navigation

METHOD_AddContact

This method adds a contact to the user's 
BlackBerry Connect
 app contact list. 
The following table describes the parameters that you can include in this method. 
Parameter
Type
Required
Description
contactId
String
This parameter specifies the ID of the contact to add to the contact list.
groupId
String
This parameter specifies the group ID to add to the contact list.
dependencies
String
This parameter specifies the other methods that this method is dependent on. 

BEMS
 response and notification 

The following table describes the parameters that 
BEMS
 returns and the notification sent to the 
BlackBerry Connect
 app when the contact is added.
Parameter
Type
Description
method
String
This parameter specifies the invoked method (for example, the AddContact method).
state
String
This parameter specifies the state of the request to 
BEMS
 (for example, Processing or Complete).

Code example

The following example sends a request to 
BEMS
 to add user1 to the user's 
BlackBerry Connect
 app contact list.
{ "method":"AddContact", "params": { "contactId":"sip:user1@example.com" }, "id":"c55", "jsonrpc":"2.0" }
If the request is successful, 
BEMS
 returns the following response to the 
BlackBerry Connect
 app and processes the request.
{ "id":"c55", "error":null, "result": { "data": { "method":"AddContact", "state":"PROCESSING" } }, "jsonrpc":"2.0", "background":true }
If there are no errors, 
BEMS
 sends the following notification to the 
BlackBerry Connect
 app and adds the contact.
{ "id":"c55", "sequence":1018541300000024, "result": { "data": { "method":"AddContact", "state":"COMPLETE" } }, "jsonrpc":"2.0" }