Hello everyone,
I need some assistance with integrating a Vapi workflow into my backend.
I’ve created a workflow on Vapi that allows users to conduct a mock interview. My goal is to trigger this workflow from my TypeScript backend so that I can implement a subscription model in my application. After triggering the workflow, I also want to send the response back to the frontend, where the user should be able to interact with the workflow in real time and provide the required inputs.
I’m attempting to call the Vapi endpoint (
https://api.vapi.ai/call/web) using Axios with the following code:
const vapiResponse = await axios.post(
"https://api.vapi.ai/call/web",
{
workflowId: VAPI_WORKFLOW_ID,
variableValues: {
username: username,
userid: userid,
},
},
{
headers: {
Authorization:
Bearer ${VAPI_API_KEY}
,
"Content-Type": "application/json",
},
}
);
However, this request is not working as expected.
If anyone has experience with Vapi workflow integration or can guide me on what I might be missing, I would really appreciate your help.