Hey everyone,
I'm hitting a wall with a peculiar network error while integrating Vapi AI with my Next.js app. Hoping some of you brilliant minds might have insights!
The Setup:
Vapi AI Assistant with a custom "Tool" to fetch user holdings.
Next.js API route (/api/kite-holdings) that calls the Kite Connect API.
Ngrok is used to expose my local Next.js server to the internet for the Vapi webhook.
The Problem:
When I use Postman (or curl) to send a POST request to my Ngrok URL (https://[my-ngrok-url]/api/kite-holdings), it works perfectly fine and returns a 200 OK with the expected data from Kite Connect. This tells me my Next.js API route, the Kite Connect integration, and the Ngrok tunnel itself are all functioning correctly.
However, when I go to the Vapi AI dashboard and test the tool, I consistently get a "Network error: Unable to connect to the server."