continuing-cyan•4mo ago
Post event to vapi
Hi there,
I try to post phonenumberid/assistantid/customernumber to the vapi server. however, I got following error:
{"detail":{"message":"Failed to place outbound call","error":"401 Client Error: Unauthorized for url: https://api.vapi.ai/call/phone"}}
DO you know if I need any specific settings?
My post ius something like:
curl -X POST http://localhost:8000/api/outbound -H "Content-Type: application/json" -d '{
"phoneNumberId": "XXXXXXXX",
"assistantId": "XXXXX",
"customerNumber": "+1234567"
}'
Thanks,
Xin
4 Replies
continuing-cyanOP•4mo ago
update:
I find the error message updated to: {'message': 'Invalid Key. Hot tip, you may be using the private key instead of the public key, or vice versa.', 'error': 'Unauthorized', 'statusCode': 401}.
BTW, I have tried both of the private and public key in the vapi api key. NOt sure if there is any specific setting we need.
Can you share the full curl request you're using in DM? Also, are you using a private API key?
continuing-cyanOP•2mo ago
SOrry for reply late Sahil. I find the problem is I need to use my public key (not private key).
Hey birdfly7259,
Thanks for reaching out! We're currently swamped with a bunch of tickets and it's taking us longer than usual to get back to everyone. I know waiting isn't fun, but we want to make sure we give your issue the attention it deserves rather than rushing through it.
We'll circle back with you soon to get this sorted out.
Hey birdfly7259,
I wanted to let you know that we're managing a high volume of support requests at
the moment, so our response time might be a bit slower than usual.
I truly appreciate your understanding and will get back to you as soon as possible!
Thanks again for your patience! Hey birdfly7259, I sincerely apologize for the delay in our responses this week. We experimented with some process adjustments that didn’t work as intended, and unfortunately, this caused some disruptions. That’s entirely my responsibility. Just a quick note—our team is unavailable on weekends. However, if something urgent or critical comes up, feel free to reach out to me directly, and I’ll assist you. The support issues will be resolved in the coming weeks, and starting Monday, you can expect more consistent and improved support. Thank you so much for your patience and for continuing to stick with us! The correct URL for placing an outbound call is https://api.vapi.ai/call. Try using that endpoint with your public API key and it should authenticate. Let us know if you would like additional assistance
Thanks again for your patience! Hey birdfly7259, I sincerely apologize for the delay in our responses this week. We experimented with some process adjustments that didn’t work as intended, and unfortunately, this caused some disruptions. That’s entirely my responsibility. Just a quick note—our team is unavailable on weekends. However, if something urgent or critical comes up, feel free to reach out to me directly, and I’ll assist you. The support issues will be resolved in the coming weeks, and starting Monday, you can expect more consistent and improved support. Thank you so much for your patience and for continuing to stick with us! The correct URL for placing an outbound call is https://api.vapi.ai/call. Try using that endpoint with your public API key and it should authenticate. Let us know if you would like additional assistance