我尝试发送消息,但是请求失败。
我尝试使用以下代码进行连接:
Twilio.init(USER_TWILIO,
TKN_TWILIO);
com.twilio.rest.api.v2010.account.Message messageWhat = com.twilio.rest.api.v2010.account.ConnectApp.Message.creator(
new com.twilio.type.PhoneNumber("number"),
new com.twilio.type.PhoneNumber("number"),
"TST")
.create();
Caused by: javax.net.ssl.SSLPeerUnverifiedException: Certificate for <api.twilio.com> doesn't match any of the subject alternative names: []
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.verifyHostname(SSLConnectionSocketFactory.java:507)