METHOD_MessageAck

This method sends an acknowledgement (delivery receipt) to BEMS for the message that was received by the BlackBerry Connect app.

The following table describes the parameters that you can include in this method.

Parameter

Type

Required

Description

messageId

String

√

This parameter specifies the message ID which the BlackBerry Connect app has obtained from the MessageReceived event.

status

String

√

This parameter specifies a status of 'delivered.'

Note: Delivered is currently the only supported status option.
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 that is sent to the BlackBerry Connect app when the the acknowledgement is sent.

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, MessageAck).

Example code

The following example sends a request to BEMS to send an acknowledge (for example, delivery receipt) for a received message.

{
 "method":"MessageAck",
 "params":
   {
     "messageId":"1",
     "status":"delivered"
   },
 "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":"MessageAck",
       "state":"PROCESSING"
     }
   },
 "jsonrpc":"2.0",
 "background":false
}

If there are no errors, BEMS sends the following notification to the BlackBerry Connect app that acknowledges the receipt of the message.

{
  "id":"c5",
  "sequence": 1018561500000012,
  "result":
   {
    "data":
     {       
       "method":"MessageAck",       
       "state":"COMPLETE"
   },
 "jsonrpc":"2.0"
}