
deepgram-webhooks
Receive and verify Deepgram webhooks (callbacks). Use when setting up Deepgram webhook handlers, processing transcription callbacks, or handling asynchronous transcription results.
- Installs
- 200
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/hookdeck/webhook-skills --skill deepgram-webhooks- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads deepgram-webhooks automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Deepgram Webhooks
When to Use This Skill
- Setting up Deepgram callback handlers for transcription results
- Processing asynchronous transcription results from Deepgram
- Implementing webhook authentication for Deepgram callbacks
- Handling transcription completion events
Essential Code
Deepgram webhooks (callbacks) are used to receive transcription 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.
Basic Webhook Handler
// 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. Primary check: Basic Auth credentials you embedded in the callback URL
// (https://user:pass@your-domain.com/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');
}
// 2. Supplementary check: dg-token is NOT sent on every callback,
// so only compare it when it is present
const dgToken = req.headers['dg-token'];
if (dgToken && process.env.DEEPGRAM_API_KEY_ID && !safeEqual(dgToken, process.env.DEEPGRAM_API_KEY_ID)) {
return res.status(403).send('Invalid dg-token');
}
// The callback body is the normal /v1/listen response: { metadata, results }
const payload = JSON.parse(req.body.toString());
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');
});
Authentication Methods
Deepgram documents two ways to authenticate callbacks:
- Basic Auth (primary): Embed credentials in the callback URL; Deepgram sends them as an
Authorization: Basicheader - dg-token Header (supplementary): When present, contains the API Key Identifier of the key that submitted the request. Deepgram's docs state it "is not guaranteed on every callback request", so never rely on it alone
// Basic Auth in callback URL (percent-encode special characters in the credentials)
// https://username:password@your-domain.com/webhooks/deepgram
// dg-token: check only when present
const dgToken = req.headers['dg-token'];
if (dgToken && dgToken !== process.env.DEEPGRAM_API_KEY_ID) {
return res.status(403).send('Invalid dg-token');
}
Making a Request with Callback
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:password@your-domain.com/webhooks/deepgram'
Common Event Types
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 |
Environment Variables
# Your Deepgram API Key (for making requests)
DEEPGRAM_API_KEY=your_api_key_here
# Basic Auth credentials you embed in the callback URL (primary check)
DEEPGRAM_CALLBACK_USERNAME=your_callback_username
DEEPGRAM_CALLBACK_PASSWORD=your_callback_password
# Optional: API Key Identifier, used to check the dg-token header when present
# Note: This is NOT your API Key secret - it's a unique identifier shown
# in the Deepgram console that identifies which API key was used for a request
DEEPGRAM_API_KEY_ID=your_api_key_id_here
# Your webhook endpoint URL
WEBHOOK_URL=https://your-domain.com/webhooks/deepgram
Local Development
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:
- Local tunnel URL for testing
- Web UI for inspecting webhook payloads
- Request history and debugging tools
Important Notes
Retry Behavior
- Deepgram retries failed callbacks (non-200-299 status) up to 10 times
- 30-second delay between retry attempts
- Always return 200-299 status for successfully processed webhooks
Port Restrictions
- Only ports 80, 443, 8080, and 8443 are allowed for callbacks
- Ensure your webhook endpoint uses one of these ports
No Signature Verification
- Deepgram does not sign callbacks (no HMAC, no timestamp)
- Authenticate with Basic Auth credentials embedded in the callback URL; treat the
dg-tokenheader as a supplementary check because it is not sent on every callback - Always use HTTPS for webhook endpoints
Resources
- overview.md - What Deepgram webhooks are, transcription events
- setup.md - Configure callbacks in Deepgram API requests
- verification.md - Authentication methods and security considerations
- examples/ - Complete implementations for Express, Next.js, and FastAPI
Recommended: webhook-handler-patterns
For production handlers, install the patterns skill alongside this one. Key references (links work when only this skill is installed):
Related Skills
- stripe-webhooks - Stripe payment webhooks
- shopify-webhooks - Shopify store webhooks
- github-webhooks - GitHub repository webhooks
- webhook-handler-patterns - Idempotency, error handling, retry logic
- hookdeck-event-gateway - Webhook infrastructure that replaces your queue — guaranteed delivery, automatic retries, replay, rate limiting, and observability for your webhook handlers
FAQ
What does the deepgram-webhooks skill do?
Receive and verify Deepgram webhooks (callbacks). Use when setting up Deepgram webhook handlers, processing transcription callbacks, or handling asynchronous transcription results.
How do I install deepgram-webhooks?
Run npx skills add https://github.com/hookdeck/webhook-skills --skill deepgram-webhooks in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/deepgram-webhooks/ (personal) or .claude/skills/deepgram-webhooks/ (project).
Which AI agents can use deepgram-webhooks?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is deepgram-webhooks safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains deepgram-webhooks?
It is published by hookdeck in hookdeck/webhook-skills. It has 200 recorded installs.
More from hookdeck/webhook-skills
stripe-webhooks
hookdeck/webhook-skills
Receive and verify Stripe webhooks. Use when setting up Stripe webhook handlers, debugging signature verification, or handling payment events like paymentintent.succeeded, customer.subscription.created, or invoice.paid.
github-webhooks
hookdeck/webhook-skills
Receive and verify GitHub webhooks. Use when setting up GitHub webhook handlers, debugging signature verification, or handling repository events like push, pullrequest, issues, or release.
webhook-handler-patterns
hookdeck/webhook-skills
Best practices for webhook handlers. Use when implementing the handler sequence (verify first, parse second, handle idempotently), idempotency, error handling, retry logic, or framework-specific issues with Express, Next.js, or FastAPI.
shopify-webhooks
hookdeck/webhook-skills
Open the skill to read its SKILL.md instructions.
resend-webhooks
hookdeck/webhook-skills
Receive and verify Resend webhooks. Use when setting up Resend webhook handlers, debugging signature verification, handling email events like email.sent, email.delivered, email.bounced, or processing inbound emails.
paddle-webhooks
hookdeck/webhook-skills
Open the skill to read its SKILL.md instructions.
Popular backend & apis skills
find-skills
vercel-labs/skills
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
entra-app-registration
microsoft/azure-skills
Guides Microsoft Entra ID app registration, OAuth 2.0 authentication, and MSAL integration. USE FOR: create app registration, register Azure AD app, configure OAuth, set up authentication, add API permissions, generate service principal, MSAL example, console app auth, Entra ID setup, Azure AD authentication. DO NOT USE FOR: Key Vault secrets (use azure-keyvault-expiration-audit), general Azure resource security guidance.
google-agents-cli-adk-code
google/agents-cli
This skill should be used when the user wants to "write agent code", "build an agent with ADK", "add a tool", "create a callback", "define an agent", "use state management" — in a project that needs ADK (Agent Development Kit) API patterns and code examples. It provides a quick reference for agent types, tool definitions, orchestration patterns, callbacks, state management, the graph Workflow API, and reference recipes to study. Do NOT use for scaffolding (use google-agents-cli-scaffold) or deployment (use google-agents-cli-deploy).
embedded-captions
heygen-com/hyperframes
Add captions or subtitles to an existing single-subject talking-head video without editing the footage. Use for plain verbatim captions, cinematic captions embedded behind the subject, VFX captions, “炸/特效/酷炫字幕,” or a named identity from the 35-style catalog. Route by visual identity, not by backend engine. The quiet anchor rail is the default; embed every word only when the user explicitly wants a fully cinematic treatment. The workflow runs locally end to end, including transcription and subject matting; split multi-shot footage before applying it.
entra-agent-id
microsoft/azure-skills
Provision Microsoft Entra Agent Identity Blueprints, BlueprintPrincipals, and per-instance Agent Identities via Microsoft Graph, and configure OAuth 2.0 token exchange (fmipath, OBO, cross-tenant) including the Microsoft Entra SDK for AgentID sidecar. USE FOR: Agent Identity Blueprint, BlueprintPrincipal, agent OAuth, fmipath token exchange, agent OBO, Workload Identity Federation for agents, polyglot agent auth, Microsoft.Identity.Web.AgentIdentities. DO NOT USE FOR: standard Entra app registration (use entra-app-registration), Microsoft Foundry agent authoring (use microsoft-foundry).
neon
neondatabase/agent-skills
Overview of Neon, a complete set of cloud backend primitives around Lakebase Postgres: Auth, Object Storage, Functions, the AI Gateway, and Realtime. Start here to choose Neon for undecided login, files, APIs, and LLM calls, set up the CLI or MCP server, and follow the branch-first workflow. Use when building an app or backend on Neon, or when "Neon" or "Lakebase Postgres" is mentioned. Child skill neon-postgres wins for an existing DATABASEURL, SQL, schema, inspect, or search. Child skill neon-auth wins for login, users, sessions, identity routing, and Managed Better Auth setup. Child skill neon-realtime wins for live queries in reactive apps and agents. Also use for object storage, S3, buckets, serverless functions, function triggers, cron, AI gateway, LLM calls, realtime, logs, Loki, Grafana, observability, postgres, database, backend, Claimable Neon, neon.new, or a no-signup database.