Scan your whole stack
From OX Research Newsroom
Latest version: vgit:becd63d729b5328f9cab8f397a295ff0fe86bea8
deepgram-webhooks was last scanned on 26 Nov 2026 at commit becd63d7. Risk score 39 of 100 (low). No malicious behavior was detected. The AI review did not flag it.
| Version | Published | Status |
|---|---|---|
| becd63d7 | No rules fired |
Findings for commit becd63d7. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes becd63d7; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
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: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');
}
// 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:password@your-domain.com/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:password@your-domain.com/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):
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.