google playGoogle Play +91 9406811127 sales@msgclub.net Support Pricing

Select Language

	
public class SendSms{         public static void main(String[] args)         {             //Your authentication key             String authkey = "yourauthkey";             //Multiple mobiles numbers separated by comma             String mobiles = "9999999999";             //Sender ID,While using route4 sender id should be 6 characters long.             String senderId = "DEMOOS";             //Your message to send, Add URL encoding here.             String message = "Test message";             //define route             String route="1";             //Prepare Url             URLConnection myURLConnection=null;             URL myURL=null;             BufferedReader reader=null;             //encoding message             String encoded_message=URLEncoder.encode(message);             //Send SMS API             String mainUrl="http://msg.msgclub.net/rest/services/sendSMS/sendGroupSms?AUTH_KEY=yourauthkey&message=message&senderId=DEMOOS&routeId=1&mobileNos=9999999999&smsContentType=english";             //Prepare parameter string             StringBuilder sbPostData= new StringBuilder(mainUrl);             sbPostData.append("authkey="+authkey);             sbPostData.append("&mobiles="+mobiles);             sbPostData.append("&message="+encoded_message);             sbPostData.append("&route="+route);             sbPostData.append("&sender="+senderId);             //final string             mainUrl = sbPostData.toString();             try             {                 //prepare connection                 myURL = new URL(mainUrl);                 myURLConnection = myURL.openConnection();                 myURLConnection.connect();                 reader= new BufferedReader(new InputStreamReader(myURLConnection.getInputStream()));                 //reading response                 String response;                 while ((response = reader.readLine()) != null)                 //print response                 System.out.println(response);                 //finally close connection                 reader.close();             }             catch (IOException e)             {                     e.printStackTrace();             }

Caution: Some users opt to place their request inside a code loop, while testing we highly recommend setting the test parameter to true , as occasionally an infinite loop can occur and users can consume all their credits very quickly.



Parameter Name with Description

Parameter Name Data Type Description
AUTH_KEY * Alphanumeric Login Authentication Key(This key is unique for every user)
message * Text Enter your message
senderId * Text Enter senderId it should be less then 6 character
routeId * Integer Which route you want use for sending sms enter routeId for particular route.use given Id for route. Transactional Route=1, Promotinal=2, Promotional SenderId=3
mobileNos * Integer Mobile number can be entered with country code or without country code Multiple mobile no. should be separated by comma
groupId * Integer To send sms to particular group enter group name created in MsgClub phone book.
smsContentType* Text "English" for text sms and "Unicode" for Unicode sms

Parameters with (*) are mandatory.

Get quick and easy use of API and test

You will get account with some demo credit to test API that help you write applications and interact with MsgClub Java APIs

I want to write my own Java code

company

HTTP API

enterprise solutions

XML API

resellers

JSON API

Industries we support

Frequently asked questions

How to send bulk SMS using API in Java?

We have two types of Java API; XML and JSON for sending SMS in bulk to your prospects from our gateway.

How to integrate SMS API in Java?

Login to our panel, go to developer tool and get different kinds of send SMS API for your own website.

How to send OTP SMS using Java?

Deploy our send SMS API for sending OTP messages from powerful OTP route and banking route.

How to send online SMS from my website in Java?

AAll you need to just call our bulk SMS API on click of action, our server will generate response on that particular request.

How to implement SMS gateway in Java?

Our developers provides you ready code in PHP with all the necessary details that helps you in integration.

Do you provide PHP script for SMS sending?

We provide you a ready-made script for sending text messages. This sample scripts are very free and easy to download.

APIs we provide

PHP SMS Gateway API SMS Gateway API for C# SMS Gateway API JAVA SMS Gateway API for VB.net SMS Gateway API for VB 6.0 SMS Gateway API  for ASP SMS Gateway API for ASP.net

APIs other than Send SMS

SCHEDULE SMS

Send Schedule SMS

Delete Scheduled SMS

Reschedule SMS

GROUP / PHONEBOOK

Add Group

Delete Group

List Group

GROUP CONTACTS

Add Contact

Edit Contact

List Contact

SMS DRAFT

Add Draft

Delete Draft

List Draft

CLIENT (USER / RESELLER)

Add Client

Edit Client

Delete Client

Client List

Disable / Enable

Forgot Password

Transaction Log

Client Balance

Fund Transfer