Overview
Organizations with EU data residency requirements may need to use Twilio’s Ireland (IE1) region for Programmable Voice, ensuring that call audio and recordings remain within the EU. This article addresses common issues encountered when enabling IE1, especially authentication errors (HTTP 401, Twilio error 20003), and provides step-by-step solutions.
Symptoms
- REST API calls to IE1 endpoints (e.g.,
https://api.ie1.twilio.com/2010-04-01/Accounts/{AccountSid}.json) return HTTP 401 with error code 20003 (authentication error). - The same credentials work against the default US1 region.
- API keys created for IE1 do not authenticate against IE1 endpoints.
- Twilio SDKs fail to update calls or perform actions in IE1, but work in US1.
Product
Programmable Voice
Environment
Twilio Console
Cause
-
Deprecation of
api.ie1.twilio.com
The legacy domainapi.ie1.twilio.comis deprecated and no longer supports standard authentication. Requests to this endpoint will fail with authentication errors. -
SDK Configuration: Edge and Region Parameters
When using Twilio Helper Libraries (SDKs), specifying only theregionparameter routes requests to the US1 cluster by default. Bothedgeandregionparameters must be set for proper regional routing.
Example (Node.js):
const client = require('twilio')(apiKeySid, apiKeySecret, {
edge: 'dublin',
region: 'ie1'
});Example (Python):
from twilio.rest import Client client = Client(apiKeySid, apiKeySecret, edge='dublin', region='ie1')
-
API Key Replication Limitation in New Console
API keys created in the new Twilio Console may not replicate correctly to regional gateways, causing authentication failures in IE1.
Resolution
To enable IE1 for Programmable Voice and resolve authentication errors:
-
Switch to the Legacy Console:
- In the Twilio Console, use the menu to toggle to the Legacy Console view (top right corner).
-
Delete and Recreate the API Key:
- Delete any problematic IE1 API keys.
- Generate a new API key directly from the Legacy Console. This ensures proper replication to regional gateways.
-
Update SDK Configuration:
- Ensure your application uses both
edgeandregionparameters as shown above.
- Ensure your application uses both
-
Remove Deprecated Endpoints:
- Do not use
api.ie1.twilio.com. Use the correct regional configuration in your SDK or API calls.
- Do not use
Additional Information
If you encounter authentication errors when enabling the IE1 region for Programmable Voice, ensure you are not using deprecated endpoints, configure both edge and region in your SDK, and generate API keys from the Legacy Console. These steps will help you meet EU data residency requirements and successfully operate in the IE1 region.
Below you will find references to useful documents: