Receive SMS reply - Two Way messaging

With the help of DNN API Endpoint module you will also be able to receive SMS on your website. This applies only to Clickatell numbers with Two Way messaging support.

For this to work, you will need two things:

  • to create one API method(POST) on your website
  • to set the URL for the above mentioned API method in your Clickatell account as the Reply Callback URL for two way messaging notifications (clickatell documentation here)

The above setup will allow you to receive an API call every time one of your two way enabled number receives a reply. From there, it’s just a matter of what you plan on doing with the information you receive from clickatell.

In your API Endpoint method you will need to have the Parse JSON into tokens action to which you provide the [RawInput] token as a JSON String, as seen in the image below. Parse JSON response into tokens

The action above will create one token for every parameter that is being sent by clickatell in the request, in the form of [BaseTokenName:ParameterName]. The tokens can then be used in all following actions like Send Email, Run SQL Query(if you want to save them in the database) and others.

Here are some token examples (for when base token name is “Parsed”):

  • [Parsed:fromNumber] - number who sent the reply
  • [Parsed:toNumber] - number to which the reply was sent
  • [Parsed:timestamp] - timestamp for when the reply was received
  • [Parsed:text] - the cotent of the SMS reply, your number received (URL encoded)