Jaws
03/14/2025, 10:14 AMVapi Support Bot
03/14/2025, 10:16 AMbash
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:
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:
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:Vapi Support Bot
03/14/2025, 10:16 AMJaws
03/14/2025, 1:25 PMJaws
03/14/2025, 1:30 PMNS.inc
03/14/2025, 1:38 PMJaws
03/14/2025, 1:44 PMShubham Bajaj
03/14/2025, 3:24 PMNS.inc
03/14/2025, 3:50 PMNS.inc
03/14/2025, 3:51 PMNS.inc
03/14/2025, 3:57 PM