Skip Navigation

METHOD_GetContactDetail

This method retrieves the contact card information for a contact in the 
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 contact ID of the contact that the contact card information is requested from. 

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 contact's information is retrieved.
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, GetContactDetail).
contact
Object
This parameter specifies the contact's information (for example, display name, email address, and mobile number).

Code example

The following example sends a request to 
BEMS
 to retrieve "user1's" contact card information.
{ "method":"GetContactDetail", "params": { "contactId":"user1@example.com" }, "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":"GetContactDetail" "state":"PROCESSING" } }, "jsonrpc":"2.0" }
If there are no errors, 
BEMS
 sends the following notification to the 
BlackBerry Connect
 app and the contact's information is displayed. 
{ "id":"C5", "sequence":948030700001213, "result": { "data": { "method":"GetContactDetail", "contact": { "sip:user1@example.com": { "displayName":"user1", "groups":[ ], "personalMessage":"I'm out of office today.", "availability":"18500", "title":"", "type":"unknown", "uri":"sip:user1@example.com", "photoHash":"PENDING", "numDevices":"1", "mobilePhone":"", "blocked":"true", "workPhone":"", "presence":"Offline", "email":"user1@example.com" } }, "state":"COMPLETE" } }, "jsonrpc":"2.0" }