Receives and verifies Deepgram webhooks for transcription, text-to-speech, and Text Intelligence results. Handles callback authentication via Basic Auth and callback secrets.
Ships in webhook-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Deepgram webhooks (callbacks) are used to receive transcription, text-to-speech and Text Intelligence results asynchronously. When you provide a callback URL in your transcription request, Deepgram immediately responds with a request_id and sends the transcription results to your callback URL when processing is complete.
// Express.js example
const crypto = require('crypto');
function safeEqual(a, b) {
const ab = Buffer.from(a || '', 'utf8');
const bb = Buffer.from(b || '', 'utf8');
return ab.length === bb.length && crypto.timingSafeEqual(ab, bb);
}
app.post('/webhooks/deepgram', express.raw({ type: 'application/json' }), (req, res) => {
// 1. Basic Auth credentials you embedded in the callback URL
// (https://user:[email protected]/webhooks/deepgram)
const auth = req.headers['authorization'] || '';
const decoded = auth.startsWith('Basic ')
? Buffer.from(auth.slice(6), 'base64').toString('utf8')
: '';
const sep = decoded.indexOf(':');
if (
sep === -1 ||
!safeEqual(decoded.slice(0, sep), process.env.DEEPGRAM_CALLBACK_USERNAME) ||
!safeEqual(decoded.slice(sep + 1), process.env.DEEPGRAM_CALLBACK_PASSWORD)
) {
return res.status(401).send('Unauthorized');
}
// The callback body is the normal /v1/listen response: { metadata, results }
const payload = JSON.parse(req.body.toString());
// 2. Optional (speech-to-text): a secret you sent as extra=callback_secret:VALUE
// comes back in metadata.extra.callback_secret
const secret = process.env.DEEPGRAM_CALLBACK_SECRET;
if (secret && !safeEqual(payload.metadata?.extra?.callback_secret, secret)) {
return res.status(401).send('Invalid callback secret');
}
const requestId = payload.metadata?.request_id;
const transcript = payload.results?.channels?.[0]?.alternatives?.[0]?.transcript;
console.log('Received transcription:', requestId, transcript);
// Return success to prevent retries
res.status(200).send('OK');
});
Deepgram doesn't sign callbacks. Its callback docs describe:
Authorization: Basic header. This is the only documented check for text-to-speech and Text Intelligence callbacksextra=callback_secret:VALUE. Deepgram returns it in metadata.extra.callback_secret in the callback body. Use a hex secret (openssl rand -hex 32): a + arrives as a spaceThe dg-token header is no longer a supported way to verify callbacks (changelog, 27 October 2026). Don't check it.
// Basic Auth in callback URL (percent-encode special characters in the credentials)
// https://username:[email protected]/webhooks/deepgram
// Optional extra secret (speech-to-text):
// https://api.deepgram.com/v1/listen?callback=https://your-domain.com/webhooks/deepgram&extra=callback_secret:YOUR_SECRET_VALUE
curl \
--request POST \
--header 'Authorization: Token YOUR_DEEPGRAM_API_KEY' \
--header 'Content-Type: audio/wav' \
--data-binary @audio.wav \
--url 'https://api.deepgram.com/v1/listen?callback=https://username:[email protected]/webhooks/deepgram'
Deepgram callbacks carry no event-type field. The body is the same JSON a synchronous /v1/listen request returns: a metadata object and a results object. The structure of results varies based on the features enabled in your request:
| Field | Description | Always Present |
|---|---|---|
metadata.request_id | Unique identifier for the transcription request (matches the request_id returned when you submitted it) | Yes |
metadata.created | Timestamp when transcription was created | Yes |
metadata.duration | Length of the audio in seconds | Yes |
metadata.channels | Number of audio channels | Yes |
metadata.extra | Key-value pairs you passed with extra=KEY:VALUE | Only if extra was sent |
results.channels[].alternatives | Transcription alternatives | Yes |
results.channels[].alternatives[].transcript | The transcribed text | Yes |
results.channels[].alternatives[].confidence | Confidence score (0-1) | Yes |
# Your Deepgram API Key (for making requests)
DEEPGRAM_API_KEY=your_api_key_here
# Basic Auth credentials you embed in the callback URL
DEEPGRAM_CALLBACK_USERNAME=your_callback_username
DEEPGRAM_CALLBACK_PASSWORD=your_callback_password
# Optional (speech-to-text): a random hex secret you send as
# extra=callback_secret:VALUE; Deepgram returns it in metadata.extra.callback_secret
DEEPGRAM_CALLBACK_SECRET=your_hex_secret_here
# Your webhook endpoint URL
WEBHOOK_URL=https://your-domain.com/webhooks/deepgram
For local webhook testing, install Hookdeck CLI:
# Create a local tunnel (no account required)
npx hookdeck-cli listen 3000 deepgram --path /webhooks/deepgram
# Use the provided URL as your callback URL when making Deepgram requests
This provides:
metadata.extra.callback_secretdg-token is no longer a supported verification methodFor production handlers, install the patterns skill alongside this one. Key references (links work when only this skill is installed):
examples/express/README.md (opens in a new tab)examples/express/package.json (opens in a new tab)examples/express/src/index.js (opens in a new tab)examples/express/test/webhook.test.js (opens in a new tab)examples/express/vitest.config.js (opens in a new tab)examples/fastapi/README.md (opens in a new tab)examples/fastapi/main.py (opens in a new tab)examples/fastapi/requirements.txt (opens in a new tab)examples/fastapi/test_webhook.py (opens in a new tab)examples/nextjs/README.md (opens in a new tab)examples/nextjs/app/webhooks/deepgram/route.ts (opens in a new tab)examples/nextjs/package.json (opens in a new tab)examples/nextjs/test/webhook.test.ts (opens in a new tab)examples/nextjs/vitest.config.ts (opens in a new tab)references/overview.md (opens in a new tab)references/setup.md (opens in a new tab)references/verification.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/webhook-skills:deepgram-webhooksfrom webhook-skills
npx claudepluginhub hookdeck/webhook-skills --plugin webhook-skills219 skills in this plugin
/ada-webhooksReceive and verify Ada (ada.cx) AI customer service webhooks, delivered through Svix. Use when setting up an Ada webhook endpoint, getting the per-endpoint whsec_ signing secret, debugging svix-id / svix-timestamp / svix-signature verification, or handling events like v1.conversation.created, v1.conversation.message, v1.conversation.ended, v1.conversation.handoff.ended, v1.end_user.created, v1.end_user.updated, v1.audit_log.emitted and v1.proactive_call.* voice outreach events.
/adyen-webhooksReceive and verify Adyen webhooks (standard notifications). Use when setting up Adyen webhook handlers, debugging HMAC signature verification, or handling payment events like AUTHORISATION, CAPTURE, REFUND, CANCELLATION, and CHARGEBACK.
/Other plugins' skills for the same job