Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

deepgram-webhooks

Latest version: vgit:becd63d729b5328f9cab8f397a295ff0fe86bea8

Overview

Last scanned
26 Nov 2026
AI: Benign Agent skill Publisher: hookdeck
103 Stars
18 Forks
1 Versions
JavaScript Repo language

Scan summary

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.

  • Releases: Single version.
  • Findings: No rules are listed for commit becd63d7.

Versions

1 version published
Versions and the rules that fired in each
VersionPublishedStatus
becd63d7 No rules fired

No rules fired in becd63d7

Findings

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.

README

The publisher’s own README, as collected from the registry.

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, 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.

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. 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');
});
Authentication Methods

Deepgram doesn't sign callbacks. Its callback docs describe:

  1. Basic Auth (recommended, all APIs): Embed credentials in the callback URL. Deepgram includes them when it sends results, and they arrive as an Authorization: Basic header. This is the only documented check for text-to-speech and Text Intelligence callbacks
  2. Secret in Extra Metadata (speech-to-text only): Send a random secret as extra=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 space

The 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
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
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

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, or for speech-to-text a secret in metadata.extra.callback_secret
  • dg-token is no longer a supported verification method
  • 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

OX Radar and Response Center

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.

Where it’s listed

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).

  • GitHub hookdeck/webhook-skills/deepgram-webhooks

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Copy of Template Design OX Blog (1)
Research

Thousands Of GitHub Accounts Hijacked With wfx-loot CI Secret Stealing Malware Via GitHub Actions & npm

Cry2Wolf: How to Tell a Real Bug from a Nothingburger
AI & VibeSec

Cry2Wolf: Not Every Branded Bug Deserves a Fire Drill

Microsoft's Official agent framework Hijacked
AI & VibeSec

BREAKING: Hijacked Releases of Microsoft’s Official agent-framework Steals Azure and CI Credentials

Frame 2085668439 (1)
Group 1261154229