Skip to content

Instantly share code, notes, and snippets.

@dmathewwws
Last active December 12, 2025 22:34
Show Gist options
  • Select an option

  • Save dmathewwws/ae9045ef66b63c8ab6aedc75759afc71 to your computer and use it in GitHub Desktop.

Select an option

Save dmathewwws/ae9045ef66b63c8ab6aedc75759afc71 to your computer and use it in GitHub Desktop.
Taddy Podcast API Webhook Endpoint Example Code
const express = require('express');
require('dotenv').config();
const app = express();
const PORT = process.env.PORT || 3000;
app.use(express.json());
app.use(express.urlencoded({ extended: true }));
// POST /webhooks/taddy - receive Taddy webhook events
app.post('/webhooks/taddy', (req, res) => {
// Check if the X-TADDY-WEBHOOK-SECRET header matches the WEBHOOK_SECRET (recommended)
const secret = req.headers['x-taddy-webhook-secret'];
if (secret !== process.env.WEBHOOK_SECRET) {
console.log('Webhook rejected: invalid secret');
return res.status(401).json({ error: 'Invalid webhook secret' });
}
// Log the webhook event
const { uuid, taddyType, action, timestamp, data, matchingFilters } = req.body;
console.log(JSON.stringify(data, null, 2));
res.status(200);
});
app.listen(PORT, async () => {
console.log(`Server listening on port ${PORT}`);
console.log('Run ngrok to get a public URL for your local webhook endpoint: `ngrok http 3000`');
console.log('Local webhook endpoint: http://localhost:3000/webhooks/taddy');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment