Blake
05/07/2025, 5:29 PMconversation-update
webhook. Error: Request failed with status code 500
I have my server URL set to my ngrok and see the traffic, but the agent only says the cached Hello.
Is this example up to date? Am I missing something that is needed to get this to work?
I get these errors when running pnpm start but it does start and receive updates from the server:
https://pastebin.com/XcVmcDpyVapi Support Bot
05/07/2025, 5:31 PMjavascript
// In your Express route handler
app.post('/callbacks/vapi', (req, res) => {
try {
console.log('Received webhook:', JSON.stringify(req.body));
// Process the webhook data
res.status(200).send('OK');
} catch (error) {
console.error('Error processing webhook:', error);
res.status(500).send('Error processing webhook');
}
});
Also verify your ngrok command uses the correct port: ngrok http YOUR_SERVER_PORT
Sources:
- [Developing Locally](https://docs.vapi.ai/server-url/developing-locally)
- [Discord Channel](https://discord.com/channels/1211482211119796234/1334280135683084328)Vapi Support Bot
05/07/2025, 5:31 PMjavascript
// In your Express route handler
app.post('/callbacks/vapi', (req, res) => {
try {
console.log('Received webhook:', JSON.stringify(req.body));
// Process the webhook data
res.status(200).send('OK');
} catch (error) {
console.error('Error processing webhook:', error);
res.status(500).send('Error processing webhook');
}
});
Also verify your ngrok command uses the correct port: ngrok http YOUR_SERVER_PORT
Sources:
- [Developing Locally](https://docs.vapi.ai/server-url/developing-locally)
- [Discord Channel](https://discord.com/channels/1211482211119796234/1334280135683084328)Shubham Bajaj
05/08/2025, 1:32 AM