Telnyx x Vapi Integration Fail (Err. 400)
# support
s
Hey, I’m trying for several days now to connect my Telnyx Account/Number with Vapi through the Vapi Dashboard, without success getting an "Error 400: Couldn’t Update Telnyx Number. Request failed with status code 401". Here are some details: - Active Number on Telnyx - Spanish Number (+34) I’ll love to get some help on how to finally resolve this issue. Thanks
v
Hi there! 👋 I understand you're having trouble connecting your Telnyx account/number with Vapi and getting an Error 400 with status code 401. I don't have access to your specific account configuration to diagnose the exact cause, but I can definitely help with some troubleshooting steps and explain what these error codes typically mean when integrating Telnyx with Vapi. ## What these errors typically mean The Error 400 (Bad Request) and status code 401 (Unauthorized) typically indicate authentication issues: - Status code 401 specifically indicates that authentication credentials are missing or invalid in the request. According to [documentation](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1334238882660618250), this error occurs when "the initial request was missing valid authentication credentials." ## Troubleshooting steps for your Spanish number Since you're using a Spanish (+34) number, there are some specific considerations: 1. **Direct import limitations**: According to [information I found](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1324828879667597424), Vapi primarily supports importing phone numbers from Twilio and Vonage directly. For Telnyx numbers, especially international ones, you may need to use SIP trunking instead. 2. **SIP Trunking setup**: For Spanish numbers, SIP trunking is likely required. This involves: - Creating a personalized origination SIP URI via the Vapi API - Setting up inbound authentication on Telnyx - Configuring the FQDN as
sip.vapi.ai
and Port as
5060
- Assigning your phone number to SIP trunking on Telnyx 3. **Authentication configuration**: Make sure to: - Verify your API keys are correct - Set up the proper authentication headers - Ensure the SIP username and credentials are correctly configured
4. **Geographic restrictions**: According to [documentation](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1332807979409342484), Vapi may have limitations with non-US numbers, which could be affecting your Spanish number. ## Specific configuration steps For Telnyx specifically, you'll need to: 1. **For inbound calls**: - Create a SIP URI via the Vapi API - Set up inbound authentication on Telnyx (Voice / SIP Trunking / Create) - Select FQDN, add SIP URI with FQDN:
sip.vapi.ai
, Port:
5060
- Assign your Spanish number to SIP trunking - Modify the SIP invite to match Vapi and Telnyx accounts 2. **For outbound calls**: - Set the outbound authentication method on Telnyx - Add Vapi IPs and select Tech Prefix - Create outbound voice profiles on Telnyx - Create a SIP Trunk Credential through Vapi API There's a detailed guide available for Telnyx and Vapi integration that might help identify misconfigurations. You can find it [here](https://docs.vapi.ai/advanced/sip/telnyx). Is there a specific part of the configuration process where you're getting stuck? I'd be happy to provide more targeted assistance. Sources: - [Discord conversation about Error 400](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1333747605628391434) - [Discord conversation about Status code 401](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1334238882660618250) - [Discord conversation about Telnyx integration](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1324828879667597424) - [Telnyx integration documentation](https://docs.vapi.ai/advanced/sip/telnyx) - [Discord conversation about geographic restrictions](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1332807979409342484)
v
Message marked as helpful by @Sacha! 🎉
Message marked as helpful by @Sacha! 🎉
k
checking if this is resolved/solved for you?