When sending a message through Panacea Mobile, you have the option to track the delivery of these messages.
If using HTTP, you need to add two additional fields to your request, as below.
When sending a message through Panacea Mobile, you have the option to track the delivery of these messages.
If using HTTP, you need to add two additional fields to your request, as below.
The report mask is what is known as a bit mask field indicating which status messages you want to receive.
To calculate the report mask, you need to pick the status codes you want to receive, and then add them together, voila! That’s your report mask.
For example: I want to receive whether my message was delivered or failed. (1, 2 and 16).
report_mask = 1 + 2 + 16 = 19
So in your next request, send report_mask=19 and we’ll send you these status’ messages where applicable.
To calculate the report mask, you need to pick the status codes you want to receive, and then add them together, voila! That’s your report mask.
For example: I want to receive whether my message was delivered or failed. (1, 2 and 16).
report_mask = 1 + 2 + 16 = 19
So in your next request, send report_mask=19 and we’ll send you these status’ messages where applicable.
Ok, so we want to send a message, and receive status reports to our server when the message is delivered, or fails.
Our request parameters will look like this:
Parameter | Example Value |
---|---|
username | myusername |
password | mypassword |
to | 27111256849 |
from | 271112221113 |
text | Hello there, we are testing delivery reports! |
report_mask | 19 |
report_url | http://myserver.com/receive_report.php?myMessageId=12345&status=%d |
The resulting URL (once we encode the data) for the request will look like this:
http://api.panaceamobile.com/json?action=message_send&username=myusername&password=mypassword&to=27111256849&from=271112221113&text=Hello+there%2C+we+are+testing+delivery+reports%21&report_mask=19&report_url=http%3A%2F%2Fmyserver.com%2Freceive_report.php%3FmyMessageId%3D12345%26status%3D%25d
view raw