Additional header from Vapi when connecting to my ...
# support
f
Hi, I'd like Vapi to pass an additional header with an API key to my server-url, especially after I've created a call, but potentially also for an incoming request. If I create a call by sending a request and include a custom header, will callback requests made to my server url include this custom header?
v
@flyingemolga Hello! When you create a call with VAPI, you can indeed specify a custom header that you'd like to pass along with the requests to your server. This is done by setting the
phoneNumber.serverUrlSecret
in your VAPI configuration. This secret will be sent as a header called
x-vapi-secret
with every request to your server. However, if you include a custom header in the request you make to create a call, that specific custom header will not automatically be included in the callback requests to your server. The callback requests will only include the headers that you have configured in your VAPI settings, such as the
x-vapi-secret
. If you need to ensure that a specific header is included in every callback request, you should configure that in your VAPI settings. If you need assistance with setting this up or have any other questions, please let me know!
You can continue this conversation by mentioning me in the message.
f
@User Please expand on being able to configure VAPI settings to include an additional header.
@Vapi
v
@flyingemolga Certainly! To include an additional header in the requests that VAPI makes to your server, you would typically need to configure this within your VAPI application settings. This is not something that can be done on a per-call basis but rather as a configuration that applies to all calls. Here's how you can set it up: 1. **API Key as a Custom Header**: If you want to send an API key or any other custom header with your callbacks, you would need to set this up in your VAPI application configuration. This usually involves specifying the header name and value in the settings. 2. **Webhook Security**: For security purposes, VAPI allows you to set a secret that will be sent as a custom header (
x-vapi-secret
) in the webhook requests to your server. This helps you verify that the requests are coming from VAPI. 3. **Configuration via Dashboard or API**: Depending on the service provider, you might be able to set these headers through a web dashboard or by making an API request to update your application settings. Please note that the exact steps to configure these settings can vary depending on the VAPI provider you are using. If you need specific instructions for your provider or if there's anything else I can assist you with, please let me know!
s
No the additional header won't be included instead you can use metadata of assistant for non-sensitive information.
2 Views