Sorry, you need to enable JavaScript to visit this website.

You are here

Reply callbacks are not working

5 posts / 0 new
Last post

Manoj's picture
by Manoj

Reply callbacks are not working
Hi guys, I am evaluating the api (using the free trial). Here is my payload: {    "to":"61434...,",   "validity":"60",   "replyRequest":"true",   "priority":false,   "notifyURL":"https://d43w33dfa.ngrok.io/",     "body":"Hi I am testing the Telstra api " }   Why am I not receiving replies. Delivery reciepts are working fine.

Dougal's picture
by Dougal

Same here
I've noticed that notifyUrl isn't being hit when users text the number that I've been provisioned. Might be a general inbound notification issue.

DeveloperSteve's picture
by DeveloperSteve

Hi manoj.perera

Likely this is due to CORS which is enabled on the api gateway, ive had the same issue when running ngrok to my local so what i do to get around it is bounce of a public server and have the callback forwarded on to my ngrok url. 

With the notifyUrl i just embed a get value for the url that i need the request to be passed on, then with the server script accept the POST then send it onto the url from the get value. 

https://example.com/redir.php?url=something.ngrok.io 

Manoj's picture
by Manoj

Second attempt
Hi Steven, I tried this time with different publicly available url where cors origin is set to *. Still the same issue. Weird thing is delivery receipts are working. Problem is only with replies.

Michelle's picture
by Michelle

Continued: Reply Callbacks not working

We've had a similar question come in to TelstraDev today:

If you do not have an inbound callback URL set up, you will only be able to get inbound messages via polling.

 

To poll for inbound messages: https://dev.telstra.com/content/messaging-api#operation/retrieveSmsReplies

To set up an inbound callback URL: https://dev.telstra.com/content/messaging-api#operation/createSubscription

A notifyURL can be set: Please note that the notification URLs and the Get /sms or /mms call are exclusive. If a notification URL has been set then the GET call will not provide any useful information.

 

For the difference between the receipt callback vs inbound callback, we have an FAQ entry:

Q: What is the difference between the notifyURL parameter in the Provisoning call versus the notifyURL parameter in the Send Message call?

A. The notifyURL in the Provisoning call will be the URL where replies to the provisioned number will be posted. On the other hand, the notifyURL in the Send Message call will be the URL where the delivery notification will be posted, e.g. when an SMS has already been delivered to the recipient.”

https://dev.telstra.com/content/messaging-api#section/Frequently-Asked-Questions

 

Hope this helps!

Log in or register to post comments