vapi-webhooks
БесплатноЗапускает вложенные скриптыНе проверенReceive and verify Vapi webhooks (the "Server URL"). Use when setting up a Vapi Server URL receiver, authenticating deliveries with a shared secret…
от hookdeck★ 104 звезды на GitHubОб этом скилле
Vapi Webhooks
Vapi is a voice-AI agent platform (assistants place and receive phone calls,
plus chat/session APIs). Its webhook endpoint is called the Server URL. It is
bidirectional: most messages are fire-and-forget notifications, but four
message types require your endpoint to return a meaningful JSON response body —
not just 200 OK — because Vapi uses your answer to drive the live call.
When to Use This Skill
- How do I receive Vapi webhooks / configure the Server URL?
- How do I authenticate a Vapi webhook? Which header carries the secret?
- Why is there no fixed HMAC signature to verify?
- How do I respond to
assistant-request,tool-calls,transfer-destination-request, orknowledge-base-request? - How do I read the event type — why is it at
message.type, not the top level?
Verification (core)
Vapi has no single, fixed signature scheme. Authentication is opt-in and
per-endpoint — a Server URL has no authentication until you attach a
credential. Auth is configured in the dashboard as a Custom Credential
(referenced by credentialId on the server object) and comes in four flavours:
- Bearer Token (recommended, fully specified): Vapi sends
Authorization: Bearer <your-token>— a literal shared secret, nothing is hashed. - Legacy
X-Vapi-Secret: the same shared-secret idea with the header name set toX-Vapi-Secretand theBearerprefix disabled. This reproduces the older inlineserver.secretfield (kept for backward compatibility). - OAuth 2.0 (client credentials): Vapi fetches a token from your token
endpoint and presents it as
Authorization: Bearer <token>. - HMAC: configurable algorithm/header/encoding/payload-format. Verified
construction (2026-08-12): HMAC-SHA256 (hex) in
x-signature, secret verbatim. The Payload Format decides what's signed:{body}signs the raw body (recommended, self-contained, Hookdeck-compatible);{timestamp}.{body}signsx-timestamp+.+ raw body and requires the timestamp header on (see references/verification.md).
The primary, fully-specified path — and the one these examples implement — is
the shared secret (#1/#2). Read the token from Authorization (stripping a
Bearer prefix) or X-Vapi-Secret, and compare it to your stored secret with a
timing-safe comparison:
const crypto = require('crypto');
function safeEqual(a, b) {
const ab = Buffer.from(a), bb = Buffer.from(b);
return ab.length === bb.length && crypto.timingSafeEqual(ab, bb); // guard: throws on length mismatch
}
// Read the shared secret from either header Vapi may be configured to send.
function extractToken(headers) {
const auth = headers['authorization'];
if (auth) return auth.startsWith('Bearer ') ? auth.slice(7) : auth;
return headers['x-vapi-secret']; // legacy header / server.secret
}
function verifyVapiSecret(headers, expected) {
const token = extractToken(headers);
if (!token || !expected) return false;
return safeEqual(token, expected);
}
import hmac
def verify_vapi_secret(headers, expected: str | None) -> bool:
auth = headers.get("authorization")
token = auth[7:] if auth and auth.startswith("Bearer ") else (auth or headers.get("x-vapi-secret"))
if not token or not expected:
return False
return hmac.compare_digest(token, expected)
There is no official Vapi SDK helper for webhook verification, and no documented source-IP allowlist. A
verifyVapiSignaturename appears in one CLI tutorial snippet with no implementation — it is a placeholder, not a real export. Don't call it.
For complete handlers with the request/response protocol and tests, see examples/express/, examples/nextjs/, examples/fastapi/.
The Envelope — message.type
Every delivery is a POST whose body wraps the event in a message object. The
event type is nested at message.type, not at the top level:
{
"message": {
"type": "status-update",
"call": { "id": "..." },
"phoneNumber": { "...": "..." },
"timestamp": 1712345678000
}
}
Dispatch on body.message.type. (A CLI tutorial page shows a flatter shape with
top-level type/transcript and names like call-started — that is informal
example code, not the wire format. Trust message.type.)
Request/Response Protocol (four types need a JSON body)
These four message.type values require a JSON response body — Vapi consumes
it to steer the call:
message.type |
Respond with | Notes |
|---|---|---|
assistant-request |
{ "assistantId": "..." }, a transient { "assistant": {…} }, a { "destination": {…} }, or { "error": "spoken message" } |
Sent when an inbound number has no assistant. Hard 7.5s end-to-end timeout (fixed). |
| `tool- |
Установить vapi-webhooks в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл vapi-webhooks?
Receive and verify Vapi webhooks (the "Server URL"). Use when setting up a Vapi Server URL receiver, authenticating deliveries with a shared secret (Authorization: Bearer or the legacy X-Vapi-Secret header), or handling voice-agent server messages — including the four request/response types that REQUIRE a JSON body back (assistant-request, tool-calls, transfer-destination-request, knowledge-base-request) plus informational ones like status-update and end-of-call-report.
Как установить скилл vapi-webhooks?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл vapi-webhooks запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic