[使用Sinch在Java中发送短信

问题描述 投票:0回答:1

我正在尝试用Java发送短信。我正在使用yhis链接中给出的代码:https://developers.sinch.com/docs/send-sms-in-java我有一个新帐户。编译器显示以下消息:java.io.IOException:服务器返回HTTP响应代码:503的URL:

https://us.sms.api.sinch.com/v1/sms/+15144651057
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
    at sms.Sms.main(Sms.java:37)

谢谢

java sms send sinch
1个回答
0
投票

尝试将+号的网址编码为%2B

希望有帮助

© www.soinside.com 2019 - 2024. All rights reserved.