Set SMS Delivery Notification URL to Account
Delivery Notifications are only supported via our API. We don't support delivery notifications via Jabber/XMPP or Slack.
Let me preface this by saying delivery notifications are not always a sure thing. In order for delivery notifications to work every hop along the way, from here to the end number, has to send them. Sometimes they don't. Also, sometimes you won't get a delivery notification for quite a while. It all depends on many variables from here to there. That said, they can be very nice in letting you know how successful your SMS message was. They are also asynchronous. This means that sending the message is a separate process from knowing if the message is delivered or not, which is why this is a separate web call to look for.
Breakdown of the delivery notification process:
You give us a message to send to some end number
The API call that you made to us to send the SMS message ends, in the response is an ID that we will refer to when we deliver the notification
We pass that message along to carriers
Carriers may pass to other carriers
Message gets delivered to device, or is rejected, fails, etc
A notification is passed back down the chain of carriers, one by one, with the status of the message
The notification finally makes it back to us
We grab your SMS Delivery Notification URL and, finally, pass that notification on to you via HTTP POST using the ID we gave you as a reference point
Query Parameter
Key | Description | Required | Example |
---|---|---|---|
url | Delivery notifications will be sent to this URL | Yes | https://mysys.com/setaccsmsdn |
sys_id | Your TxTRIA sys_id | Yes | ACfc98e7b0aae031b9h... |
auth_token | Your TxTRIA account token | Yes | c74eac89884a126a2c... |
$url = 'https://txtria.net/api/setaccsmsdn';
$data = array(
'url' => 'https://mysys.com/setaccsmsdn',
'sys_id' => 'ACfc98e7b0aae031b9fa',
'auth_token' => 'c74eac89884a126a2cca'
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Example Response
{
"success": "1",
"message": "Successfully set delivery notification URL"
}