Java Sample Code

        
          import java.net.*;
          import java.io.*;
          import java.util.*;

          public class Main
          {
            public static void main (String[]args)
            {
              try
              {
                String query = "https://app.multitexter.com/v2/app/sms";
                  String email = "your multitexter registered email ";
                  String password = "Your password";
                  String message = "message content";
                  String sender_name = "Your sender name";
                  String recipients = "mobile numbers seperated by comma e.9 2348028828288,234900002000,234808887800";
                  String forcednd = "set to 1 if you want DND numbers to ";
                  String param = "{\"email\":\""+email+"\",\"password\":\""+password+"\",\"message\":\""+message+"\",\"sender_name\":\""+sender_name+"\",\"recipients\":\""+recipients+"\",\"forcednd\":\""+forcednd+"\"}";

                  URL url = new URL (query);
                  HttpURLConnection conn = (HttpURLConnection) url.openConnection ();
                  conn.setConnectTimeout (5000);
                  conn.setRequestProperty ("Content-Type",
                  "application/json; charset=UTF-8");
                  conn.addRequestProperty ("User-Agent",
                  "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0");
                  conn.setDoOutput (true);
                  conn.setDoInput (true);
                  conn.setRequestMethod ("POST");

                  OutputStream os = conn.getOutputStream ();
                  os.write (param.getBytes ("UTF-8"));
                  os.close ();

                  // read the response
                  // InputStream in = new BufferedInputStream(conn.getInputStream());
                  // String result = org.apache.commons.io.IOUtils.toString(in, "UTF-8");

                   BufferedReader in = new BufferedReader (new InputStreamReader (conn.getInputStream ()));
                   String inputLine;
                   StringBuffer response = new StringBuffer ();

                   while ((inputLine = in.readLine ()) != null)
                  {
                    response.append (inputLine);
                  }

                  in.close ();
                  conn.disconnect ();

                  System.out.println(response)  ;
                } catch (Exception e)
                {
                  System.out.println (e.toString ());
                }
            }
          }