360learning-webhooks
БесплатноЗапускает вложенные скриптыНе проверенReceive and verify 360Learning webhooks (learning platform, delivered through Svix). Use when creating 360Learning webhook subscriptions, debugging…
от hookdeck★ 104 звезды на GitHubОб этом скилле
360Learning Webhooks
360Learning sends webhooks when things happen on a learning platform: users are created or updated, learners finish course attempts, path session statuses change, certificates are awarded, groups and skills change. Each subscription covers one event type and one URL, and has its own signing secret. 360Learning delivers through Svix and signs each POST in the Standard Webhooks format.
When to Use This Skill
- How do I receive 360Learning webhooks?
- How do I verify a 360Learning webhook signature?
- Where do I find the 360Learning webhook signing secret?
- Why does my 360Learning signature never match? (usually: the body was re-serialised, or the secret wasn't base64-decoded)
- How do I rotate a 360Learning signing secret without downtime?
- How do I handle
course.attempt.closedorpath.session.user.status.updated?
Verification (core)
| Header | Value |
|---|---|
webhook-id |
Unique event ID, the same on every retry |
webhook-timestamp |
Unix seconds when this attempt was emitted |
webhook-signature |
Space-separated v1,<base64 HMAC-SHA256> entries (two after a rotation) |
Signed content is {webhook-id}.{webhook-timestamp}.{raw body}. The HMAC key is the base64-decoded signing secret: 360Learning's sample decodes it with Buffer.from(signingSecret, "base64"). Its docs show the secret only as a placeholder (password123) and don't mention a whsec_ prefix; strip one if present, then decode.
const crypto = require('crypto');
function verify360LearningWebhook(rawBody, headers, secret) { // rawBody: exact bytes, NOT JSON.stringify(req.body)
const id = headers['webhook-id'];
const timestamp = headers['webhook-timestamp'];
const signatureHeader = headers['webhook-signature'];
if (!id || !timestamp || !signatureHeader || !secret) return false;
const key = Buffer.from(secret.replace(/^whsec_/, ''), 'base64'); // decode, don't use the string
const expected = crypto.createHmac('sha256', key)
.update(`${id}.${timestamp}.`).update(rawBody).digest();
// Check every v1 entry (new and legacy secret both sign for 24h after a rotation).
return signatureHeader.trim().split(/\s+/).some((entry) => {
const [version, signature] = entry.split(',');
if (version !== 'v1' || !signature) return false;
const given = Buffer.from(signature, 'base64');
return given.length === expected.length && crypto.timingSafeEqual(given, expected);
});
}
Fail closed: return 500 if the secret is unset and 400 if verification fails. Python uses the same steps with base64.b64decode, hmac.new(key, ..., hashlib.sha256) and hmac.compare_digest.
Use the raw body. 360Learning's own Node sample builds the signed content from
JSON.stringify(req.body). That reproduces the signed bytes only when the parsed-and-re-serialised JSON is byte-identical to what was sent; any whitespace, key order, number format or\uescape difference breaks it. The examples verifyexpress.raw(),request.arrayBuffer()andawait request.body()bytes instead. Their sample'scrypto.timingSafeEqualcall also throws on a signature of a different length; check lengths first.
For complete handlers with tests, see examples/express/, examples/nextjs/, examples/fastapi/.
360Learning recommends also rejecting a webhook-timestamp more than about 5 minutes from your clock. The examples make that optional (THREE_SIXTY_LEARNING_WEBHOOK_TOLERANCE_SECONDS) and dedupe on webhook-id. See references/verification.md.
One Secret per Subscription
A subscription is one event type plus one URL, and every subscription has its own secret. To receive several event types at one route, create one subscription per type and configure every secret: the examples accept a comma-separated list in THREE_SIXTY_LEARNING_WEBHOOK_SECRET and pass if any secret matches. Hookdeck's 360Learning source type (THREE_SIXTY_LEARNING) verifies with one secret, pasted with or without whsec_, so use one Hookdeck source per subscription.
Payload
Most events share one envelope; timestamp is in milliseconds:
{
"type": "user.created",
"timestamp": 1749816650724,
"data": {
"userId": "684c154ab06eb32565e5cbc0",
"createdAt": "2025-06-13T12:10:50.568Z",
"firstName": "Ada",
"lastName": "Lovelace",
"mail": "[email protected]"
}
}
The xapi and xapi.started subscriptions are different: the body is an xAPI statement (id, actor, verb, object, context, timestamp) with no type field. Dispatch on type, and treat a body with verb and actor as a statement.
Common Event Types
| Event | Fired when | Key data fields |
|---|---|---|
user.created |
A user is created as active | userId, mail, firstName, lastName, `createdA |
Установить 360learning-webhooks в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл 360learning-webhooks?
Receive and verify 360Learning webhooks (learning platform, delivered through Svix). Use when creating 360Learning webhook subscriptions, debugging webhook-signature verification (webhook-id, webhook-timestamp, base64-decoded signing secret from Settings > Webhooks or GET /api/v2/webhooks/subscriptions/{id}/secrets), handling secret rotation, or reacting to events like user.created, course.attempt.closed, path.session.user.status.updated, user.certificate.awarded and xAPI statements.
Как установить скилл 360learning-webhooks?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл 360learning-webhooks запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic