adverse-sapphire•4w ago
URGENT: Invoke Tool at call start
Hi we need to call a tool to fetch a bearer token to pass the token to subsequent API calls. Currently, not matter what we try, the bearer token API gets called at the same time as the 2nd API, and so we don't get the token in time and the 2nd API fails. The {{token}} is a required variable in the 2nd API call but VAPI just sends a blank. Is it possible to force VAPI to get the bearer token as soon as the call starts?
5 Replies
Hi there,
Thank you for your message. Our team is currently out of the office. We operate Monday through Friday, from 9:00 AM to 8:00 PM Pacific Standard Time (PST).
We’ll get back to you as soon as possible during our normal business hours.
If your message is urgent, please mark it accordingly or include “URGENT” in the subject line, and we’ll do our best to respond promptly.
Warm regards,
Vapi
Customer Support Team
Vapi
Customer Support Team
The recommended solution is to use Vapi's OAuth 2.0 credential system, which automatically fetches and injects bearer tokens for your API calls—no need to manually invoke a tool at call start.
Setup Example:
Create the OAuth 2.0 credential in the Vapi dashboard and reference its ID as shown above. Vapi will handle token fetching and refreshing automatically for all subsequent API calls (see docs).
Source:
- Server authentication
⤵️ Mention @Vapi Support Bot for follow-ups 🐥
adverse-sapphireOP•4w ago
Unfortunately, the backend is not OAuth 2.0. It's some 3rd-party custom scheme where we simply send an API key to a URL and they send back a bearer token.
genetic-orange•4w ago
You'd be better using a no-code automation platform such as Make or N8N to create a Custom Function Tool. That's easy in Make - there's a recent blog post that details the mechanism.
Make
Make | AI Workflow Automation Software & Tools
Automate your work. Make allows you to visually build, scale and automate AI and agentic workflows. User friendly no-code integration tool. Try it now for free!
I sincerely apologize for the delayed response to your support request.
We implemented better tracking for support tickets to ensure timely responses going forward, but due to a technical limitation, this only applies to tickets created after this past week.
I'm closing this older ticket, but if your issue still needs attention, please:
Reply with 'REOPEN' or
Email support@vapi.ai with any updates
I'll personally ensure your new request gets prompt attention.
Thank you for your patience.
Best regards,
Vapi Support Team