I am using clickatell sms gateway to send SMS to the User in Java.
For that I have registered on clickatell and purchased Small Business API - Americas Regional Traffic to send sms to USA users. I have activated Two-Way Number . My Java code is looks like -
String url = "http://api.clickatell.com/http/sendmsg?";
List<NameValuePair> params = new LinkedList<NameValuePair>();
params.add(new BasicNameValuePair("user", "user"));
params.add(new BasicNameValuePair("password", "password"));
params.add(new BasicNameValuePair("api_id", "XXXXX"));
params.add(new BasicNameValuePair("to", "1XXXXXXXXXX"));
params.add(new BasicNameValuePair("text", "Demo Message"));
params.add(new BasicNameValuePair("from", "my-two-way-number"));
params.add(new BasicNameValuePair("mo", "1"));
String paramString = URLEncodedUtils.format(params, "utf-8");
url += paramString;
HttpGet get = new HttpGet(url);
HttpResponse response = client.execute(get);
When I run this java code I get the api-message-id in response, I have checked the status of the this api-message-id on clickatell message report it shows Delivered to gateway, but the message was received on the Phone.
The phone number format I'm using is 1 for country code and rest 10 digits of phone number. When I try with other format it gives me error.
I am not understanding why I am not receiving SMS on my phone while it is showing Delivered to gateway
If you have sent the sms to an Indian number:
As per TRAI regulations, you are only permitted to deliver promotional or commercial messages during normal office hours. Please refer to the following page for the full regulations
http://www.nccptrai.gov.in/nccpregistry/regulation1diccndiv.pdf.
Please refrain from sending messages after 9pm India local time.
I have contacted the customer care and came to know this information.