API Request Tool + dynamic Bearer token
# support
a
Hey! I’m stuck with Vapi’s API Request Tool + dynamic Bearer token. I set the header as: Authorization: Bearer {{access_token}} In the Test Tool modal, I can see access_token populated (sample token), but when I hit Send, the actual request header still sends literally Bearer {{access_token}} (not substituted), so the request fails with 401. Has anyone gotten dynamic header variables to work in the API Request Tool test runner? Any workaround? https://cdn.discordapp.com/attachments/1463235401480278228/1463235401635598367/Screenshot_2026-01-20_at_12.52.10_PM.png?ex=697cf529&is=697ba3a9&hm=093b6c19f220e403891d383568df2cc25de4f294de5b6b02de8435572c8ea5e9& https://cdn.discordapp.com/attachments/1463235401480278228/1463235402075734026/Screenshot_2026-01-20_at_12.51.57_PM.png?ex=697cf529&is=697ba3a9&hm=3528813b28247d927c88684cc614de08702bfefccc25ad96f2286067ed4d8ecc&
v
Workaround: Instead of using a dynamic variable in the header, create a custom credential in the Vapi dashboard and select it in your API Request Tool configuration. This ensures the Authorization header is set correctly, even in the test runner. Example: 1. Go to Dashboard → Custom Credentials → Add Credential. 2. Choose Bearer Token, enter your token, and save. 3. In your tool config, select this credential under "Authentication". This approach avoids issues with variable substitution in headers during testing and is the recommended method for authentication ([see documentation](https://docs.vapi.ai/server-url/server-authentication)). Sources: - [Default Tools](https://docs.vapi.ai/tools/default-tools) - [Server authentication](https://docs.vapi.ai/server-url/server-authentication)
c
one workaround could be loading the value in the
assistantOverrides.variableValues
object on call start. then you could use {{access_token}} or whatever you named the variable in your tool. if this doesnt work, there is a fix for it coming in the next update or two.