11

I am developing a web application in which I need to SMS and Email.Sending Email can be easily done but I need help in sending SMS.So for a beginner who dont know even what API's are required to send SMS,what All are required to send SMS.I mean to

  • Is there any SMS gateway required?
  • Any requirement of server? I found some links like and this But this are using some kind of dongle/GSM network.But suppose for a web application how to do this because I can not connect a USB dongle on client side.Any help is appreciated
Community
  • 1
  • 1
SpringLearner
  • 13,738
  • 20
  • 78
  • 116
  • the message would be sent from the server, not the client, so the dongle if any would have to be attached to the server as well. – jwenting Oct 15 '13 at 06:03
  • @jwenting suupose for web application generally we deploy in the tomcat server,so you mean to say that the server computer must be having dongle – SpringLearner Oct 15 '13 at 06:06
  • yes, exactly. That's where the message would come from, not the computer looking at the web app in the browser. – jwenting Oct 15 '13 at 06:09
  • @jwenting you should have given it as answer so that i can upvote it,well if you have already worked on sms can you post some working codes – SpringLearner Oct 15 '13 at 06:10

6 Answers6

9

You can use RESTFul API such as

  1. Twillio (http://www.twilio.com/docs/api/rest/sending-sms)
  2. Plivo (https://plivo.com/docs/api/message/#message)
  3. Tropo (https://www.tropo.com/docs/scripting/quickstarts/sending-text-messages)
  4. Call Fire (https://www.callfire.com/products/text-messaging)

and there will be many more as well.

Gaurang Jadia
  • 1,516
  • 15
  • 18
  • Thanks for the help and +1 for the same.Can you give me some working examples – SpringLearner Oct 15 '13 at 05:47
  • Sure, I would love to help you with the working code example. In which language do you want? C#, Java, PHP, Python? – Gaurang Jadia Oct 15 '13 at 15:20
  • I need in java,would be grateful to you if you please provide me in java – SpringLearner Oct 16 '13 at 03:40
  • Ok, Will make small example code snippet with Twillio! – Gaurang Jadia Oct 16 '13 at 14:58
  • So what do i need to do from the beginning – SpringLearner Oct 17 '13 at 03:32
  • You need to sign up with Twillio Developer Account. They will give you initial development credit. Something like $20. Start reading Twillio RESTFul API Docs. That will help you to understand the SMS API. – Gaurang Jadia Oct 17 '13 at 16:03
  • ok I will follow as you said,do you personally work on Twillio? – SpringLearner Oct 18 '13 at 03:35
  • Yes, I work with Twillio API to make Call and send out SMS! – Gaurang Jadia Oct 18 '13 at 16:09
  • Can I have your emailID so that if I later I have some doubt then I can ask you? – SpringLearner Oct 19 '13 at 03:39
  • Can you please tell me how to send sms using twilio from the beginning?I did not get any idea after reading also getting started – SpringLearner Oct 19 '13 at 12:08
  • Sure, I am going to write small sample code for you and post it. Mostly today! – Gaurang Jadia Oct 19 '13 at 19:04
  • Hello @javaBeginner, As I promised you! I have wrote small example for you using Twilio API. I have kept the API Key and Auth Token as my Dev Account. You can replace with your Key and Token. You need to verify your Phone Number to test via SandBox Account. Here is the link to my Example. http://jadia.us/1guE3Uz – Gaurang Jadia Oct 20 '13 at 08:44
  • I have some doubt,please give me your emailid so that i can directly contact you – SpringLearner Oct 21 '13 at 03:43
  • Sure, Send me email at http://jadia.us/16quMmx – Gaurang Jadia Oct 21 '13 at 15:41
  • I have already sent you mail,Well I used the way you said in the blog but I get error http://stackoverflow.com/questions/19487628/exception-in-thread-main-java-lang-noclassdeffounderror-org-codehaus-jackson thats why I am asking your emailid – SpringLearner Oct 21 '13 at 16:42
  • In the blog you have have given the codes.Can you please give the total project so that I will directly put in tomcat/webapps and run it. – SpringLearner Oct 21 '13 at 16:45
  • Let me host it somewhere for better understanding! I will email you back the code as well. – Gaurang Jadia Oct 21 '13 at 16:58
  • I am using twilio for sending SMS.Please tell me is there any way to know whether has reached at the destination or not?In my web app I need to show status of the SMS – SpringLearner Nov 08 '13 at 10:10
  • You need to mention StatusCallback URL when you do RESTful request to send SMS. Twillo will call respective URL with POST Method with Status of SMS. Please, find more at http://jadia.us/17ddIkq – Gaurang Jadia Nov 08 '13 at 18:27
  • I didnt find any method which will do StatusCallBack URl.Can you please answer my post http://stackoverflow.com/questions/19858044/how-do-i-know-if-sms-has-reached-at-destination-in-twilio – SpringLearner Nov 09 '13 at 03:44
3

Having a gateway is not a must. If you don't have a gateway what you can do is use your mobile phone or dongle as a serial modem and send SMS through that.

One of the most popular libraries that you can use is Ozeki. It includes an example code pack.

Rob
  • 26,989
  • 16
  • 82
  • 98
2

I will suggest that you should use JSMPP (git page). JSMPP is the Java implementation of SMPP (Short Message Peer-to-Peer). It provides the communication channel between your web application and the SMS service center. It supports upto 5000 SMSs per second. The SMS service center will charge you for the service but you can do as much testing as you want by using Selenium simulator. Both the JSMPP and Selenium simulator are free of cost.

Sikander
  • 834
  • 2
  • 10
  • 33
1

If you need a free SMS gateway, there isn't one. No cellular network provider would want to expose free APIs and get themselves in trouble. You will have to go for paid services.

Amith Koujalgi
  • 10,746
  • 2
  • 18
  • 22
  • 1
    not so much trouble as cost. It costs the networks money (and quite a bit) to handle those messages, maintain the hardware, employ people. – jwenting Oct 15 '13 at 06:02
  • @jwenting: By trouble, I meant security threats and issues like that. – Amith Koujalgi Apr 16 '14 at 11:33
  • hmm, there's no real difference in such between paid and free services. Of course the cost of dealing with them has to be worn, which is another reason for such services not being free. – jwenting Apr 17 '14 at 10:18
0

you can use smslib [1]: http://smslib.org/ which is a library supports java .net through which you can use sms gateway like gateway modem, or you can use mobile (as sms gateway) to send sms and receive.

Personally i suggest you to development activity and testing, i did some research and conclude that once you move your application to production and connecting your mobile or sms modem is bit tedious as far as i know :), in this phase there are many online sms gateway providers based on your location who provides you an interface where you can send/receive message and it may cost you .

pappu_kutty
  • 2,378
  • 8
  • 49
  • 93
  • How can I use modem in web application – SpringLearner Oct 15 '13 at 05:55
  • you can buy sms gateway modem and connect your modem to your computer through usb port.cehck this http://www.ozekisms.com/index.php?ow_page_number=201 (just for example you can find more device based on requirement) , For e.g if you are using smslib which is interface between your code and your device (either mobile /modem) and smslib has a test class upon running the class will detect the device . once connected you can send/receive messages. also check what are the compatible devices. – pappu_kutty Oct 15 '13 at 06:04
  • can you give me some free one,I am just a beginner and so can not afford money – SpringLearner Oct 15 '13 at 06:07
  • smslib is free and you can download the lib from here http://smslib.org/download/ , then later if you have mobile connect to your computer, note there are specific mobile models which smslib will support, once you connect your mobile do test as i said above. this is simple , if you cant afford mobile i cant help you bro :) – pappu_kutty Oct 15 '13 at 06:10
  • I have downloaded it but i do not know how to use – SpringLearner Oct 15 '13 at 06:11
0

You can use SMSGateway.me, you have to download their android app on your phone which will act as sender, and from your web app you can schedule messages via REST API.

Ashhad
  • 9
  • 1