Setting a Response SMS to Marketing Call-to-Actions
Keyword Response URL
If you have set up an SMS keyword on a long code (10-digit VMN) or a short code and want to send a
dynamic response SMS to the user, you need to set a keyword response URL.
To access the keyword response URL:
- Log in to Gupshup Enterprise SMS.
- Click on Keywords in the menu bar.
- Click Create Keyword Group.
- Check Response URL.
Whenever a request is received on the defined keyword, it will be forwarded to the given response URL, such as
www.example.com. On receiving an incoming message corresponding to a keyword, the GupShup server calls the
following URL:
http://www.example.com?phonecode=%pcode&keyword=%kw&location=%loc&carrier=%car&content=%con&msisd
n=%ph×tamp=%time
The response URL consists of details of a response such as the sender’s phone number, the time when the request was received, the keyword on which request was received, the additional message with the request, and so on. Thus, for the keyword Test, phone code 92xxxxxxx, and message “Test Nagpur”, the server calls the following URL:
http://www.example.com?phonecode=92xxxxxx0&keyword=Test&location=Mumbai&carrier=Vodafone&content=T
estNagpur&msisdn=9812348765×tamp=13082098000
If you wish to generate a response through the callback URL, you must ensure that the response conforms to a
specified XML format. If the remote server returns an invalid XML message or does not return an XML message at
all, the first 160 characters of the server response are used to compose the message.
XML Example
<response>
<message type=“text”>Message 1</message>
<message type=“text”>Message 2</message>
</response>
The following diagram explains the entire flow of the keyword response process.
Missed Call Response URL
To enable missed call response URL, we request you to provide us with your URL so that the same can be configured
with your missing call number.
- A request is received on the defined miscall and it will be forwarded to the given response URL, such as
www.example.com. - To respond to the missed call, the GupShup server calls the following URL:
http://www.example.com/getresponse.php?msisdn=$msisdn&extension=$extension&causeId=$causeId&hasUserH
ungUp=$hasUserHungUp×tamp=$timestamp&carrier=$carrier&location=$location
- The response URL consists of details such as msisdn which is sender’s phone number, the time when
a request was received, the extension on which miscall was received, the additional hasUserHungUp.
Sample URL
http://www.example.com/getresponse.php?msisdn=9199XXXXXXXX&extension=61XXXXXX&causeId=274797509
1988275239&hasUserHungUp=false×tamp=1427095786196&carrier=Airtel&location=Mumbai
The parameters are as follows:
- msisdn =Sender’s mobile number from which the request has been received.
- extension = Missed call number
- causeId = Transaction id (This Id is unique for each request)
- hasUserHungUp = If the user has hung up at the time of giving a missed call, it will be true, else it will be false.
- timestamp = Time at which a missed call was given
- carrier = Home operator of the mobile number
- location = Location of the mobile number.
Updated over 1 year ago