Callback URL & Status URL

Callback URL

In order to use the callback_url and status_url you need to have a system that can accept http post requests from our server. The system has been tested with PHP, ColdFusion, JAVA, and .Net applications. Most API users want to integrate an existing system with an SMS delivery application. If you do not need to do this, using the existing web based application may be the right solution for you. If you have additional questions regarding what technology or platform you should use please contact your account representative.

Using The Platform

Using the callback_url or status_url requires that some elements of the system be configured. You must first have an active, valid account. With this account you will have a user name (phone number) and password. These credentials will allow you to gain access to the platform. Once there you can manage all aspects of your account. You will need to have at least 1 division and group created. The group keyword (default or custom) must also have a call back url defined. This url should point back to your system.

Coded Examples:

PHP Example

<?php $title = !empty($_REQUEST['title']) ? $_REQUEST['title'] : ''; $code = !empty($_REQUEST['code']) ? $_REQUEST['code'] : ''; $shortcode = !empty($_REQUEST['shortcode']) ? $_REQUEST['shortcode'] : ''; $message = !empty($_REQUEST['message']) ? $_REQUEST['message'] : ''; $phone = !empty($_REQUEST['phone']) ? $_REQUEST['phone'] : ''; $carrier = !empty($_REQUEST['carrier']) ? $_REQUEST['carrier'] : ''; $keyword = !empty($_REQUEST['keyword']) ? $_REQUEST['keyword'] : ''; $group = !empty($_REQUEST['group']) ? $_REQUEST['group'] : ''; $custom_ticket = !empty($_REQUEST['custom_ticket']) ? $_REQUEST['custom_ticket'] : ''; $default_keyword = !empty($_REQUEST['default_keyword']) ? $_REQUEST['default_keyword'] : ''; /* These will only be passed if the company has webservice credentials defined. */ $user_name = !empty($_REQUEST['user_name']) ? $_REQUEST['user_name'] : ''; $password = !empty($_REQUEST['password']) ? $_REQUEST['password'] : ''; $api_key = !empty($_REQUEST['api_key']) ? $_REQUEST['api_key'] : ''; /* ------------------------------------------------------------------------------*/ //do something spectacular within your application ?>

C# Example

string title = Request["title"]; string code = Request["code"]; string shortcode = Request["shortcode"]; string message = Request["message"]; string phone = Request["phone"]; string carrier = Request["carrier"]; string keyword = Request["keyword"]; string group = Request["group"]; string custom_ticket = Request["custom_ticket"]; string default_keyword = Request["default_keyword"]; /* These will only be passed if the company has webservice credentials defined. */ string user_name = Request["user_name"]; string password = Request["password"]; string api_key = Request["api_key"]; /* ------------------------------------------------------------------------------*/ //do something amazing within your application

Cold Fusion

<cfif IsDefined('POST.title')> <cfset title = #POST.title#> </cfif> <cfif IsDefined('POST.code')> <cfset code = #POST.code#> </cfif> <cfif IsDefined('POST.shortcode')> <cfset shortcode = #POST.shortcode#> </cfif> <cfif IsDefined('POST.message')> <cfset message = #POST.message#> </cfif> <cfif IsDefined('POST.phone')> <cfset phone = #POST.phone#> </cfif> <cfif IsDefined('POST.carrier')> <cfset carrier = #POST.carrier#> </cfif> <cfif IsDefined('POST.keyword')> <cfset keyword = #POST.keyword#> </cfif> <cfif IsDefined('POST.group')> <cfset group = #POST.group#> </cfif> <cfif IsDefined('POST.custom_ticket')> <cfset custom_ticket = #POST.custom_ticket#> </cfif> <cfif IsDefined('POST.default_keyword')> <cfset default_keyword = #POST.default_keyword#> </cfif> <!--- These will only be passed if the company has webservice credentials defined. ---> <cfif IsDefined('POST.user_name')> <cfset user_name = #POST.user_name#> </cfif> <cfif IsDefined('POST.password')> <cfset password = #POST.password#> </cfif> <cfif IsDefined('POST.api_key')> <cfset api_key = #POST.api_key#> </cfif> <!--- ------------------------------------------------------------------------------ ---> <!--- do something amazing within your application --->

Keyword Example with Callback URL

  1. Setup a callback URL in the callback_url field of a keyword object
  2. Text into that keyword
  3. Check the location of the callback URL and see if the information of the subscriber was saved
  • Here is an included diagram to show the flow of the callback functionality.

  • Message from your system to the user

  • Message from user to the system

To Be Able To Test Your Callback URL:

You can enter your callback page in the box below and select the 'Test Callback URL' button to send a test version of what a callback will look like entering your system.


Status URL

The Status URL can be used to receive real time updates of message delivery. This will reduce the chore of making an extra webservice call to a messagesSent report. To use the Status URL you only need to include the url where you want the information to be posted to, in the sendMesage and sendTemplateMessage field "status_url".

In order to use this Status URL you need to have a system that can accept http post requests from our server. The system has been tested with PHP, ColdFusion, JAVA, and .Net applications. Most API users want to integrate an existing system with an SMS delivery application. If you have additional questions regarding what technology or platform you should use please contact your account representative.

Coded Examples:

PHP Example

<?php $code = !empty($_REQUEST['code']) ? $_REQUEST['code'] : ''; $sendTo = !empty($_REQUEST['sendTo']) ? $_REQUEST['sendTo'] : ''; $status = !empty($_REQUEST['status']) ? $_REQUEST['status'] : ''; $ticket = !empty($_REQUEST['ticket']) ? $_REQUEST['ticket'] : ''; $custom_ticket = !empty($_REQUEST['custom_ticket']) ? $_REQUEST['custom_ticket'] : ''; /* ------------------------------------------------------------------------------*/ //do something spectacular within your application ?>

C# Example

string code = Request["code"]; string sendTo = Request["sendTo"]; string status = Request["status"]; string ticket = Request["ticket"]; string custom_ticket = Request["custom_ticket"]; /* ------------------------------------------------------------------------------*/ //do something amazing within your application

Cold Fusion

<cfif IsDefined('POST.code')> <cfset code = #POST.code#> </cfif> <cfif IsDefined('POST.sendTo')> <cfset sendTo = #POST.sendTo#> </cfif> <cfif IsDefined('POST.status')> <cfset status = #POST.status#> </cfif> <cfif IsDefined('POST.ticket')> <cfset ticket = #POST.ticket#> </cfif> <cfif IsDefined('POST.custom_ticket')> <cfset custom_ticket = #POST.custom_ticket#> </cfif> <!--- ------------------------------------------------------------------------------ ---> <!--- do something amazing within your application --->

To Be Able To Test Your Status URL:

You can enter your callback page in the box below and select the 'Test Status URL' button to send a test version of what a staus will look like entering your system.