我试图调用一个API,结果得到了SSL
错误,很可能是因为TLS
版本不匹配。请指导我需要做些什么才能使它发挥作用。你知道吗
` import ssl
from twilio.rest import Client
accountSID = 'xxxxxx'
authToken = 'xxxxxxx
twilioCli = Client(accountSID, authToken)
myTwilioNumber = '+14955551234'
myCellPhone = 'xxxxxxxx'
message = twilioCli.messages.create(body='Mr.Ankit - you are doing great.', from_=myTwilioNumber, to=myCellPhone)
print(message.sid)`
Python代码生成错误:
"HTTPSConnectionPool(host='api.twilio.com', port=443): Max retries exceeded with url: /2010-04-01/Accounts/AC1f7769b1600b53ae66ebd6a7c4cd1b92/Messages.json (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])")))"
SSL
版本1.1
Python
版本是3.7
目前没有回答
相关问题 更多 >
编程相关推荐