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:
Method¶
GET
Endpoint URL¶
The xxxx.backendless.app
is a subdomain assigned to your application. For more information see the Client-side Setup section of this documentation.
https://xxxx.backendless.app/api/messaging/<message-id>
where:
Argument | Description |
---|---|
<message-id> |
ID of the message to get the status for. This is the id returned by the Message Publishing API request. |
Request Headers¶
user-token: optional value obtained as a result of the login operation.
where:
Argument | Description |
---|---|
user-token |
Optional header. Contains a value returned by Backendless in a preceding user Login API call. If user-token is set in the request, the operation will be executed with the security policy associated with the currently logged in user. This means all the permissions and roles assigned to the user will be enforced by Backendless. |
Request Body:¶
None
Response Body¶
{
"status" : "failed" | "published" | "scheduled" | "cancelled" | "unknown",
"messageId" : value,
"errorMessage" : value
}
If the status
property is "failed", the errorMessage
property should contain the details of the failure.
Codeless Reference¶
where:
Argument | Description |
---|---|
message id |
ID of the message for which the publishing status is retrieved. |
Returns an object containing message status details. The object contains the following properties:
where:
Argument | Description |
---|---|
messageId |
ID of the message for which the publishing status is retrieved. |
status |
can be one of the following values: FAILED , PUBLISHED , SCHEDULED , CANCELLED , UNKNOWN |
errorMessage |
contains a detailed error message when status is "failed" . |
The example below checks the message status with the following identifier: "message:6052643A-F96C-4253-BCF0-F606A4BBB794"
.