Hello Everyone, I will be showing you how to send Sms through your Java Program. For this we will be using Fast2Sms Service , we will use their Api for sending Sms'
I will take you through all the steps and believe me , if you are able to follow these steps , you will find it very easy to send messages!!
Step1:
->Go to fast2sms.com and signup . It is completely free.
Step2:
->After signing up , login with your mobile number and password
-> After logging in you will come to this page which is your dashboard
-> On the top left corner of your screen , you will see a box which says Add-Credit . Above that you will see that you have received some credit. Now for each sms you send ,20paise will be deducted from the credit you have received. After your credit becomes zero , you will have to pay , if you wish to continue. But we can send enough free messages for practice.
-> There is a navigation bar on the left. Click on DEV-API

Step3: ->After you click on Dev-Api , you will land here ...

->Copy your Api-Key , it will be used when we write our java program
->After that , click on CLICK HERE , TO READ API DOCUMENTATION,
-> We will be firing a get request to this site with our api key.
->After that, click on Bulk Sms(Service)Api. You will arrive on this page

NOW LETS MOVE ON TO WRITING OUR CODE . I HAVE CREATED A FILE CALLED SENDSMS.java.