| |
|
|
What is SMS Application?
SMS Application is an application that can be used to provide services like news, sports, travel information, chat etc. by communicating through SMS. It can be built using any programming language like Java, C, C++, Perl, PHP, Python etc.
Examples
Several applications, which use the SMSGupShup AppPlatform, like Chat, MovieMeter, LoveMeter, Quiz are already live. For example, you can sms LOVE to 56767888 and experience the LoveMeter application.
What you need
- Knowledge of any programming language
- Understanding of web applications and the ability to host one
- Familiarity with JSON, XML.
Application Setup with SMSGupShup
- Click here to register your application with SMSGupshup. A few terms that you should know :
- AppUrl : URL of the server where you plan to host your application. AppPlatform will forward all requests for your application to this URL.
- Keyword : A unique word which an application user will send with the SMS which lets the AppPlatform resolve the application that the user wants to interact with.
-
Once you submit the required information you will get a unique Application key (called GUID) and a password.
- GUID : A unique identifier for each application. All responses from the application must contain it. A sample GUID looks like 11b9d590-cbba-11dd-a049-00163e000015
-
All requests that an application makes to SMSGupShup AppPlatform must contain the corresponding Application Key (GUID) and password. This is required for security purposes and to uniquely determine the application.
Application Setup on your host
Once you have registered your application with SMSGupShup, its time to build the application and host it.
- SMSGupShup communicates with an application via the AppUrl which is provided while registering the application. So make sure that you have hosted your application on the correct URL.
-
A brief description of environment variables which are passed in every call is below:
- MSISDN : Sender's phone number in case of incoming. For outgoing it should be the recipient's number.
- content : Content of the SMS message.
- The platform, on receiving a SMS meant for your application, will call the AppUrl with sender's phone number (msisdn) and content of the message, for example
<AppUrl>?msisdn=919811384697&content=Hello+Hi
- The outgoing messages generated by your App in response to the incoming message, should be sent in the response of the above mentioned HTTP GET call as JSON / XML string.
-
JSON format
[ { "msisdn":"919811956807", "content":"Hi karan, you got Hi from 919811384697"},
{"msisdn":"919953681038", "content":"Hi Dheeraj, you got Hi from 919811384697"} ]
-
XML format
<ApplicationResponse>
<Response>
<msisdn>919811956807</msisdn>
<content>Hi karan, you got Hi from 919811384697</content>
</Response>
<Response>
<msisdn>919953681038</msisdn>
<content>Hi Dheeraj, you got Hi from 919811384697</content>
</Response>
<ApplicationResponse>
Sample Application: HelloWorld
"HelloWorld" is a very simple application. It returns a "Hello, This is simple application" message in response to any request sent to this application.
Register Application
First register your application so that SMSGupShup team can know about it.
| App Name: | Hello World |
| AppUrl: | http://example.com/helloworld |
| Description: | HelloWorld App Demo |
| GUID: | ffabfe30-cbd4-11dd-a049-00163e000015 |
| Keyword: | Hello |
PHP Implementation
- Request url:<AppUrl>?msisdn=919811956807&content=Hi
- Response generated : [ { "msisdn":"919811956807", "content":"Hello, This is simple application" } ]
-
Application code:
<?php
$msisdn = $_GET["msisdn"];
$content = $_GET["content"];
$reply = "Hello, This is simple application";
$a = array('msisdn'=>$msisdn, 'content'=>$reply);
$json_response = json_encode($a);
echo "[$json_response]";
?>
FAQs
1. Can I create more than one application?
Ans. Yes! You can create up to three apps. But, every app needs to be registered. And no two apps can have the same keyword.
2. Can I have more than one keyword?
Ans. You can have more than one keyword per app. But, two apps can not have a common keyword. Also, every keyword goes through manual verification process.
3. Can I choose any word as my keyword?
Ans. No! Some keywords like smsgupshup, join, invite, help etc. are restricted. Any previously registered keyword is also restricted to maintain uniqueness. We also do not allow objectionable words.
4. Can I send unlimited outgoing responses from my app?
Ans. Outgoing responses are throttled. This means that you have a limit on the number of messages that you can send out using your app. We allow sending upto 10 messages when you first create your app. You exhaust your limit by value 1 by sending 1 outgoing message, and get 5 limit points for each incoming message to your application.
For example: When you first create an SMS app, you have an outgoing limit of 10. After you send 6 outgoing messages, your limit is decreased to 10 - 6 = 4. Now you get three responses. And your new limit is 4 + 5 + 5 + 5 = 19. So, if your application is interactive and people really like to respond to you, you will never run out of limit points. If however you fail to get responses in a certain ratio, we are afraid, you application will starve and will not be able to send any more messages through our platform.
5. What is the ideal value of incoming/outgoing ratio?
Ans. An ideal application will have the maximum possible value for this ratio. In order to survive the throttle barrier, you need a ratio of at least 0.2.
|
|
|
|