2

我正在使用clickatell短信网关向 Java 中的用户发送短信。

为此,我在 clickatell 上注册并购买了Small Business API - Americas Regional Traffic向美国用户发送短信。我已经激活了双向号码。我的 Java 代码看起来像 -

    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);

当我运行此 java 代码时,我得到了 api-message-id 作为响应,我检查了clickatell 消息报告中 this api-message-id的状态,它显示为 Delivered to gateway,但该消息是在电话上收到的。

我使用的电话号码格式是1 代表国家代码,其余 10 位电话号码。当我尝试使用其他格式时,它给了我错误。

我不明白为什么我的手机在显示已发送到网关时没有收到短信

4

2 回答 2

2

如果您已将短信发送到印度号码:

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

请不要在印度当地时间晚上 9 点之后发送消息。

我已经联系了客户服务并了解了这些信息。

于 2014-11-22T21:12:00.707 回答
1

“交付到网关”是指 Clickatell 已将其交付给网关提供商,然后网关提供商将尝试将其交付给您的手机。一旦发生这种情况,状态将更改为“已送达手机”或“收件人已收到”或类似内容。

于 2013-08-08T13:48:33.740 回答