URL Receipts
When sending a message, you can request that the associated receipt(s) are forwarded to the URL you specify. The following parameters are required when this feature is required:
|
api_id |
Your API id, issued by WebTEXT |
|
api_pwd |
Your API password, issued by WebTEXT |
|
txt |
Text to be sent |
|
dest |
Message Destination |
|
receipt |
Must be specified, with a value of 1. |
|
msgid |
Unique numerical id, supplied by you. It will be returned with the receipt to allow you associate the incoming receipt with its corresponding sent message. |
|
receipt_url |
The URL to which the receipt message will be forwarded. |
Example
This is a sample GET request, sending the text 'test message' to 4471234567, requesting the receipt to be sent to URL 'http://www.mydomain.com/rx_in.html':
The message is sent to the intended recipient. Upon successful delivery, or failure, WebTEXT will receive a receipt from the network. The receipt will have one of two possible values:
|
1 |
DELIVERY_SUCCESS |
|
2 |
DELIVERY_FAILURE |
The resulting GET request will be sent to the specified URL, as follows:
http://www.mydomain.com/rx_in.html?msgid=13974&dest=4471234567&status=1
The parameters sent to the specified URL are:
|
msgid |
This is the msgid submitted with the initial request. |
|
dest |
This is the destination number to which this receipt relates |
|
status |
The receipt status, where 1=success and 2=failure. |
Retries
WebTEXT will attempt to send the receipt to the specified URL 5 times in total, at the following intervals:
1st attempt: Immediately on arrival of receipt.
2nd attempt: 1 minute later
3rd attempt: 5 minutes after 2nd attempt.
4th attempt: 30 minutes after 3rd attempt.
5th attempt: 60 minutes after 4th attempt.
Once the WebTEXT server receives a successful (2xx) HTTP response code, the receipt is regarded as sent successfully. Your script does not need to return anything specific, but must exist.
