Vapi helps developers build, test, and deploy voice agents at scale. We enable everything in between the raw models and production, including telephony, test suites, and real-time analytics.
To configure a webhook URL for receiving events from Vapi, you'll follow these steps:
Set up a Tunneling Service: Use a tunneling service like ngrok to expose your local server to the internet. Run:
ngrok http 4242
ngrok http 4242
This creates a public URL to forward requests to your local server.
Start the Vapi Listener: Use the Vapi CLI to start a webhook listener that forwards events to your local server:
vapi listen --forward-to localhost:3000/webhook
vapi listen --forward-to localhost:3000/webhook
Ensure your local server is running on port 3000 or configure the forwarding as needed.
Update Vapi Webhook URLs: Go to your Vapi Dashboard and update the webhook URLs to point to the ngrok public URL. This would include the Assistant webhook URL, Phone number webhook URL, etc., depending on your setup:
Assistant webhook URL: https://abc123.ngrok.io
Assistant webhook URL: https://abc123.ngrok.io
Test and Debug: Trigger webhook events by interacting with your Vapi setup (e.g., making calls). Use the provided tunnels to receive and log these events locally.
For more detailed setup and options, you can refer to the Local Webhook Testing guide. This outline will guide you on how to configure your webhooks effectively in a local development environment.