How should the server URL auth token header be set...
# support
b
I read the docs but didn't see anything besides setting the server URL. Looks like the server URL secret doesn't set the Authorization header. How do I set the auth header so I can POST from Vapi with auth?
v
@byteninja256 You're correct that the server URL secret is used differently from the Authorization header. To set the Authorization header for your POST requests from Vapi, you would typically include it in the header section of your request configuration. Here's an example of how you can set the Authorization header using cURL:
Copy code
bash
curl --request POST \
  --url https://api.vapi.ai/phone-number/import/twilio \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  --header 'x-vapi-secret: YOUR_SERVER_URL_SECRET'
Replace
YOUR_ACCESS_TOKEN
with your actual access token and
YOUR_SERVER_URL_SECRET
with the server URL secret you have set up. This will ensure that your request is authenticated and that Vapi includes your server URL secret in the request headers. If you need to set this up in a different programming language or have any other questions, please let me know, and I'll be happy to assist you further!
You can continue this conversation by mentioning me in the message.
b
I don't see a way to make a curl command or request from Vapi so this isn't helpful
s
Below the Server URL Field there is Server Secret Field
y
The Secret Field is not getting saved
The Secret Field is not getting saved @Sahil
s
can you record a loom video + network tab details? will get this fixed.
6 Views