Skip to content

Get Message Status

Backendless server handles message publishing as an autonomous task. As a result, the final status of the message publishing operation is not available right away. To retrieve the status, the client application must make a separate API call as documented below:

Non-blocking API

Backendless.Messaging.getMessageStatus( messageId )
 .then( function( status ) {
  })
 .catch( function( error ) {
  });

Blocking API

var status = Backendless.Messaging.getMessageStatusSync( messageId );

where:

messageId-  ID of the message assigned to the message and returned by the Message Publishing API request.

Return Value

Method returns a JS object with the following structure:

{
  messageId:<messageId>,
  status:<status>,
  errorMessage:<errorMessage>
}

where:

Argument                Description
<messageId> ID of the message for which the publishing status is retrieved.
<status> can be one of the following "published", "scheduled", "cancelled", "failed" or "unknown".
<errorMessage> contains a detailed error message when the status property is "failed".