notificationstatus
POST v1/simplepush/notificationstatus#
With this API, you can query the status of a notification you sent earlier. For this, you need the pushId that the Diyalog system created for your request at the time of sending.
API requests
- Must be authenticated with HMAC Authentication. For HMAC Authentication, see the Authentication document.
- API URI : https://DIYALOG-SERVER-API-ENDPOINT/v1/simplepush/notificationstatus
- HTTP Request Type POST
- HTTP Content-Type application/json
Request Body#
| Schema |
|---|
| json object |
| push_id (String) The unique id created by the Diyalog system for your request, returned in the API response of the sendpush API request. |
Example Json Request Body :#
Responses#
| HTTP 200 Response |
|---|
| json object The API returns a json object as a response. It contains your request details for the given pushId, how many users the notification was sent to, how many users it failed for, and why it failed. |
| pushId (String) The id of the request whose status you queried is returned in the response. |
| requestAt (Unix epoch timestamps (miliseconds)) The request time, in milliseconds. |
| requestDetail (json object) Returns the details of the request you made to the sendpush API. The object's content is the same as the sendpush request object. |
| info (json object) An object containing detailed information. |
| devices (integer) The number of users to whom the notification was sent successfully. |
| failed (json object array) An array with information about the users for whom the notification sending failed. It contains objects with the user number and error code. |
| customerNo (String) The user number to which the notification could not be sent |
| errorCode (String) The reason for the error. It can take the following values. USER_NOT_FOUND_IN_SYSTEM USER_PUSH_TOKEN_NOT_FOUND May contain the APNS rejection reason. GOOGLE FCM error cases: FCM_ERROR_INVALID_REGISTRATION : The device token is not valid. FCM_ERROR_NOT_REGISTERED : The device token is not valid. FCM_ERROR_XXX : Other error cases. The error detail is given in the part marked XXX. FCM_INTERNAL_ERROR_DESERIALIZATION_EXCEPTION : The notification was not sent because the Diyalog application threw an exception. Huawei HMS error cases: HMS_ERROR_XXX : Other error cases. The error detail is given in the part marked XXX. See the Huawei HMS documentation for detailed error codes. "80100000" ⇒ "Some tokens are right, the others are illegal" "80100001" ⇒ "Parameters check error" "80100002" ⇒ "Token number should be one when send sys message" "80100003" ⇒ "Message structure error" "80100004" ⇒ "TTL is less than current time, please check" "80100013" ⇒ "Collapse_key is illegal, please check" "80100016" ⇒ "Message contians sensitive information, please check" "80200001" ⇒ "Oauth authentication error" "80200003" ⇒ "Oauth Token expired" "80300002" ⇒ "APP is forbidden to send" "80300007" ⇒ "Invalid Token" "80300008" ⇒ "The message body size exceeds the default value set by the system (4K)" "80300010" ⇒ "Tokens exceed the default value" "81000001" ⇒ "System inner error" "82000001" ⇒ "GroupKey or groupName error" "82000002" ⇒ "GroupKey and groupName do not match" "82000003" ⇒ "Token array is null" "82000004" ⇒ "Group do not exist" "82000005" ⇒ "Group do not belond to this app" "82000006" ⇒ "Token array or group number is transfinited" "82000007" ⇒ "Invalid topic" "82000008" ⇒ "Token array null or transfinited" "82000009" ⇒ "Topic num transfinited, at most 2000" "82000010" ⇒ "Some token is wrong" "82000011" ⇒ "Token is null" "82000012" ⇒ "Data storage location is not selected" "82000013" ⇒ "Data storage location does not match the actual data" HMS_INTERNAL_ERROR_DESERIALIZATION_EXCEPTION : The notification was not sent because the Diyalog application threw an exception. |
Example Response Body :#
| HTTP 500 Response |
|---|
| string When the API encounters a general error, it returns a response with the HTTP 500 status code. The API's error message is returned as text. |
If the request fails HMAC validation, the following errors are returned as plain text. See Authentication.
| HTTP status | Message | Description |
|---|---|---|
| 400 | Required headers not found | One or more of the x-dlg-date, x-dlg-requester-userid or x-dlg-authorization headers are missing. |
| 400 | Authorization failed due to data format not valid | The x-dlg-authorization value after DLGA is not in the AccessKeyId:Signature form. |
| 400 | Date format is invalid. EEE, dd MMM yyyy HH:mm:ss Z is requied | The x-dlg-date value cannot be parsed in this format. The message text is returned as shown, including its spelling. |
| 401 | Authorization failed | The x-dlg-authorization header does not contain DLGA , the AccessKeyId is unknown, or the signature is not correct. |
| 401 | You have no permission on this operation. Contact your admin. | The signature is correct, but your access key has no push permission. |
| 403 | Request time may not be correct. | The x-dlg-date value differs from the server time by more than 15 minutes. |