Webhooks
Webhooks Meetingize में कुछ होने पर आपके server को सूचित करते हैं, ताकि आपको poll न करना पड़े। प्रत्येक delivery एक HTTPS POST है जिसमें JSON event होता है, और जिस पर एक ऐसे secret से हस्ताक्षर होते हैं जिसे केवल आप और Meetingize जानते हैं।
Endpoint register करें
Section titled “Endpoint register करें”Web app में: Settings > Developers > Add an endpoint। या webhooks scope के साथ API के माध्यम से:
curl -s -X POST "$MEETINGIZE_API/webhook_endpoints" \ -H "Authorization: Bearer $MEETINGIZE_API_KEY" -H "Content-Type: application/json" \ -d '{"url": "https://hooks.example.com/meetingize", "events": ["transcription.completed", "document.generated"]}'प्रतिक्रिया में signing secret (whsec_...) होता है, जो केवल एक बार दिखाया जाता है। URLs में https का उपयोग होना चाहिए और वे सार्वजनिक address पर resolve होने चाहिए (निजी और loopback addresses अस्वीकार किए जाते हैं)। स्थानीय रूप से परीक्षण करने के लिए, अपने endpoint को tunnel के साथ उपलब्ध कराएँ (उदाहरण के लिए ngrok या Cloudflare Tunnel)।
Events
Section titled “Events”| Type | कब | data.object |
|---|---|---|
transcription.completed | diarized transcript उपलब्ध है | job (+ meeting) |
transcription.failed | transcription विफल हुई | error के साथ job |
processing.completed | AI meeting report तैयार है | job (+ meeting) |
processing.failed | सफल transcription के बाद AI report विफल हुई | error के साथ job |
document.generated | document generation सफल हुआ | job (+ document) |
document.failed | document generation विफल हुआ | error के साथ job |
usage.threshold_reached | महीने का API उपयोग wallet के 50, 80 या 100 %, या खर्च सीमा के 80 या 100 % तक पहुँचा | usage_alert |
ping | “send a test” बटन या POST /webhook_endpoints/{id}/test | { "message": "..." } |
ping को छोड़कर हर event प्राप्त करने के लिए "*" को subscribe करें।
{ "id": "evt_7d1f...", "object": "event", "type": "transcription.completed", "created": "2026-10-11T14:03:22Z", "api_version": "2026-10-01", "livemode": false, "data": { "object": { "id": "job_9b0c...", "object": "job", "kind": "transcription", "status": "running", "stage": "processing", "meeting_id": "1b9e...", "metadata": { "crm_id": "42" }, "meeting": { "id": "1b9e...", "object": "meeting", "title": "RDV client", "status": "transcribed" } } }}Headers
Section titled “Headers”Content-Type: application/jsonUser-Agent: Meetingize-Webhooks/1.0Meetingize-Event-Id: evt_7d1f...Meetingize-Event-Type: transcription.completedMeetingize-Delivery-Id: whd_...Meetingize-Signature: t=1760191402,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bdSignature सत्यापित करें
Section titled “Signature सत्यापित करें”v1, "{t}.{raw_body}" का hex HMAC-SHA256 है, जिसमें आपका पूरा secret (whsec_...) key के रूप में है। सत्यापित करने के लिए:
- raw अनुरोध body पढ़ें (किसी भी JSON parsing से पहले);
- HMAC पुनः गणना करें और header के प्रत्येक
v1=मान से constant time में तुलना करें; - यदि
tअभी से 5 मिनट से अधिक दूर है तो event अस्वीकार करें (replay सुरक्षा); Meetingize-Event-Idपर duplicates हटाएँ (deliveries कम से कम एक बार होती हैं)।
Secret rotation के दौरान पुराना secret 24 घंटे तक मान्य रहता है और header में दो v1= मान होते हैं।
Python
Section titled “Python”import hashlib, hmac, time
def verify_meetingize_signature(raw_body: bytes, header: str, secret: str, tolerance: int = 300) -> bool: items = [p.split("=", 1) for p in header.split(",") if "=" in p] timestamps = [v for k, v in items if k == "t"] signatures = [v for k, v in items if k == "v1"] if not timestamps or not signatures: return False t = int(timestamps[0]) if abs(time.time() - t) > tolerance: return False expected = hmac.new(secret.encode(), f"{t}.".encode() + raw_body, hashlib.sha256).hexdigest() return any(hmac.compare_digest(expected, s) for s in signatures)
# Flask examplefrom flask import Flask, request, abortapp = Flask(__name__)
@app.post("/meetingize")def meetingize_webhook(): if not verify_meetingize_signature(request.get_data(), request.headers.get("Meetingize-Signature", ""), secret="whsec_..."): abort(400) event = request.get_json() # enqueue work, return fast return "", 204Node.js
Section titled “Node.js”import crypto from 'node:crypto';import express from 'express';
function verifyMeetingizeSignature(rawBody, header, secret, toleranceSec = 300) { const parts = (header || '').split(',').map((p) => p.split('=')); const t = Number((parts.find(([k]) => k === 't') || [])[1]); const sigs = parts.filter(([k]) => k === 'v1').map(([, v]) => v); if (!t || !sigs.length || Math.abs(Date.now() / 1000 - t) > toleranceSec) return false; const expected = crypto.createHmac('sha256', secret).update(`${t}.`).update(rawBody).digest('hex'); return sigs.some((s) => s.length === expected.length && crypto.timingSafeEqual(Buffer.from(s), Buffer.from(expected)));}
const app = express();// Keep the raw body: verification must run on the exact bytes receivedapp.post('/meetingize', express.raw({ type: 'application/json' }), (req, res) => { if (!verifyMeetingizeSignature(req.body, req.get('Meetingize-Signature'), process.env.MEETINGIZE_WEBHOOK_SECRET)) { return res.sendStatus(400); } const event = JSON.parse(req.body.toString('utf8')); res.sendStatus(204);});Shell (debugging)
Section titled “Shell (debugging)”BODY_FILE=event.json # raw body as receivedHEADER='t=1760191402,v1=5257a8...'SECRET='whsec_...'T=$(echo "$HEADER" | tr ',' '\n' | sed -n 's/^t=//p')EXPECTED=$( { printf '%s.' "$T"; cat "$BODY_FILE"; } | openssl dgst -sha256 -hmac "$SECRET" -hex | sed 's/^.* //')echo "$HEADER" | tr ',' '\n' | grep -q "^v1=$EXPECTED$" && echo "valid" || echo "INVALID"meetingize CLI में भी meetingize webhooks verify है।
Delivery, retries और अक्षम करना
Section titled “Delivery, retries और अक्षम करना”- आपके endpoint को 10 सेकंड के भीतर
2xxसे उत्तर देना होगा। Redirects का पालन नहीं किया जाता। काम asynchronous रूप से करें और जल्दी उत्तर दें। - विफल deliveries को 1 मिनट, 5 मिनट, 30 मिनट, 2 घंटे, 6 घंटे, 12 घंटे और 24 घंटे बाद retry किया जाता है (कुल 8 प्रयास), फिर
failedचिह्नित किया जाता है। - लगातार 15 विफल प्रयासों के बाद endpoint अक्षम हो जाता है (
disabled_reason: "too_many_failures") और स्वामी को ईमेल भेजा जाता है। इसेPATCH /v1/webhook_endpoints/{id}{"enabled": true}से या web app से फिर सक्षम करें। - Delivery log (status, HTTP code, आपकी प्रतिक्रिया के पहले 1 KB, अवधि, अगला retry) web app में और
GET /v1/webhook_endpoints/{id}/deliveriesसे दिखाई देता है, 30 दिन तक रखा जाता है। - क्रम की गारंटी नहीं है। आगमन क्रम के बजाय
createdऔर job status का उपयोग करें।
Secret rotate करें
Section titled “Secret rotate करें”POST /v1/webhook_endpoints/{id}/rotate_secret नया secret लौटाता है। दोनों secrets 24 घंटे तक deliveries पर हस्ताक्षर करते हैं, जिससे आपको नया secret deploy करने का समय मिलता है।