Использование API Twilio на сервере https - PullRequest
0 голосов
/ 05 августа 2020

Я пытаюсь отправить сообщение, но запрос не выполняется.

Я пытался подключиться с помощью следующего кода:

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