Reply to an Incoming SMS
6 min
note "currently incoming sms feature is not available" currently, only outgoing sms services are available for outgoing sms services, trai has made it mandatory to register in the dlt portals for the detailed information, see trai regulations on commercial communications (dlt portal) sms in india https //support exotel com/en/support/solutions/articles/3000096504 to respond to an incoming sms, there are two use cases use cases use case 1 you receive an incoming sms, and you want to send a dynamic reply to the sender use case 2 you receive an incoming sms and you just want to get details of an incoming sms at your server — without having to send back a reply sms set up the "send a reply" applet on the installed apps http //my exotel in/apps#installed apps page, corresponding to your app, click edit sms app drag and drop the "send a reply" applet into the app you are building in the text box, you can enter a url (instead of static text) when there is an incoming sms, exotel will make an http get request to your web app at the above url your web app should respond with the sms body to send as a reply (see details below) before the get request, exotel will make an http head request to make sure that the url is indeed returning the correct contenttype as mandated below http request (from exotel to your url) the get request that exotel makes to the url will have the following query parameters parameter name value smssid string, unique identifier of that sms from string, the number of the sender to string, your exotel company number http //my exotel in/numbers where the sms was received date string, time when the sms reached exotel's servers body string, the contents of the sms sample http request (if the url you have entered is http //example com/exotel php ) get /exotel php?smssid=xxxxxx\&from=9052161119\&to=56070\&date=xxxxx\&body=hello+world http/1 1 http response (from your web server to exotel) use case 1 if you want to send an sms back to the sms er , your web server must set the content type http header to text/plain and nothing else must support a head request http //en wikipedia org/wiki/head request#request methods from exotel and return the exact same headers that it would for a get request must put the sms to reply within the http body of the response below is a sample http response from your web server http/1 1 200 ok content type text/plain content length 130 thanks for your order inquiry through sms your order #12345 has been shipped already and will reach you in the next 2 3 days use case 2 if you don't want to send an sms response back to the sender , your web server must set the content length header to 0 must leave the body of the http response empty need help? if you have any questions or concerns, please connect with us using the chat widget on your exotel dashboard or whatsapp us on 08088919888
Have a question?
Our super-smart AI, knowledgeable support team and an awesome community will get you an answer in a flash.
To ask a question or participate in discussions, you'll need to authenticate first.
