v
Hi there! I see you're having trouble linking your Vapi phone number with Telnyx. Those credential errors can be frustrating, but I can help you troubleshoot! 🔍 Based on the error messages you're seeing, here are some steps to resolve the issue: ### 1. Verify your SIP trunk configuration Make sure you've created the SIP trunk credential correctly on Vapi:
Copy code
bash
curl -X POST https://api.vapi.ai/credential \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your-vapi-private-api-key" \
-d '{
"provider": "byo-sip-trunk",
"name": "Telnyx Trunk",
"gateways": [
{
"ip": "sip.telnyx.com"
}
]
}'
[Source](https://docs.vapi.ai/advanced/sip/telnyx) ### 2. Check for common credential issues: - **API Key Format**: Ensure there are no extra spaces or characters in your API key - **Authorization Header**: Make sure you're using the correct format:
Authorization: Bearer YOUR_API_KEY
- **Endpoint Issues**: Verify you're using the correct and up-to-date endpoints - **Key Permissions**: Confirm your API key has the necessary permissions ### 3. Verify your phone number setup: After creating the trunk, make sure your phone number is properly linked:
Copy code
bash
curl -X POST https://api.vapi.ai/phone-number \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your-vapi-private-api-key" \
-d '{
"provider": "byo-phone-number",
"name": "Telnyx SIP Number",
"number": "your-sip-phone-number",
"numberE164CheckEnabled": false,
"credentialId": "your-new-trunk-credential-id-which-you-got-from-previous-step"
}'
### 4. Test your API key: Try verifying your API key with a simple request:
Copy code
bash
curl --location --request GET 'https://api.vapi.ai/users' \
--header 'Authorization: Bearer YOUR_PRIVATE_API_KEY'
From your third image, it looks like you might also need to set up a connection, application, or profile for your phone number in Telnyx. Make sure this step is completed as well. Let me know if you need any clarification on these steps! 👍 Sources:
j
I have done it but now how do i set up a connection, application, or profile for my phone number in telnyx. Can you please guide me through this step by step i have no idea how.
@User
n
so you mean the configuration in telnyx to connect vapi assistant?
Yes i would like to connect a phone number i bought on telnyx to vapi so i can use it for my voice agent @NS.inc
s
@Jaws @NS.inc did you guys checked out this doc https://docs.vapi.ai/advanced/sip/telnyx
n
yes, please use the api described in https://docs.vapi.ai/advanced/sip/telnyx
if you are trouble to use api, send me the vapi token so I can test and will show you.
Or use vapi dashboard