Describe the bug
When initializing the Twilio client with region='ie1', the Regulatory Compliance API (numbers.v2.regulatory_compliance) resolves to https://numbers.ie1.twilio.com. However, this hostname is no longer present in the SSL certificate's SANs, causing SSLCertVerificationError: certificate verify failed: Hostname mismatch.
Code snippet
from twilio.rest import Client
client = Client(account_sid, auth_token, region='ie1')
# This hits https://numbers.ie1.twilio.com and fails SSL verification
regulations = client.numbers.v2.regulatory_compliance.regulations.list()
Actual behavior
SSLError: HTTPSConnectionPool(host='numbers.ie1.twilio.com', port=443):
Max retries exceeded with url: /v2/RegulatoryCompliance/Regulations...
Caused by SSLError(SSLCertVerificationError(1,
"[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: Hostname mismatch,
certificate is not valid for 'numbers.ie1.twilio.com'"))
Expected behavior
The SDK should route to the new localized domain pattern or at minimum use a hostname with a valid certificate.
twilio-python version
9.10.4
Python version
3.11.9
Logs or error messages
No response
Additional context
No response
Describe the bug
When initializing the Twilio client with
region='ie1', the Regulatory Compliance API (numbers.v2.regulatory_compliance) resolves tohttps://numbers.ie1.twilio.com. However, this hostname is no longer present in the SSL certificate's SANs, causingSSLCertVerificationError: certificate verify failed: Hostname mismatch.Code snippet
Actual behavior
Expected behavior
The SDK should route to the new localized domain pattern or at minimum use a hostname with a valid certificate.
twilio-python version
9.10.4
Python version
3.11.9
Logs or error messages
No response
Additional context
No response