Salta ai contenuti

Webhook

I webhook notificano il vostro server quando succede qualcosa in Meetingize, così non dovete eseguire il polling. Ogni consegna è una POST HTTPS con un evento JSON, firmato con un secret noto solo a voi e a Meetingize.

Nell’app web: Impostazioni > Sviluppatori > Aggiungi un endpoint. Oppure tramite l’API con lo scope webhooks:

Terminal window
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"]}'

La risposta contiene il secret di firma (whsec_...), mostrato una sola volta. Gli URL devono usare https e risolversi in un indirizzo pubblico (gli indirizzi privati e loopback vengono rifiutati). Per testare in locale, esponete il vostro endpoint con un tunnel (ad esempio ngrok o Cloudflare Tunnel).

TipoQuandodata.object
transcription.completedla trascrizione con diarizzazione è disponibilejob (+ meeting)
transcription.failedla trascrizione è fallitajob con error
processing.completedil report IA della riunione è prontojob (+ meeting)
processing.failedil report IA è fallito dopo una trascrizione riuscitajob con error
document.generateduna generazione di documento è riuscitajob (+ document)
document.faileduna generazione di documento è fallitajob con error
usage.threshold_reachedil consumo API del mese ha raggiunto il 50, l’80 o il 100 % del wallet, oppure l’80 o il 100 % del tetto di spesausage_alert
pingpulsante “invia un test” o POST /webhook_endpoints/{id}/test{ "message": "..." }

Sottoscrivete "*" per ricevere tutti gli eventi tranne ping.

{
"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" }
}
}
}
Content-Type: application/json
User-Agent: Meetingize-Webhooks/1.0
Meetingize-Event-Id: evt_7d1f...
Meetingize-Event-Type: transcription.completed
Meetingize-Delivery-Id: whd_...
Meetingize-Signature: t=1760191402,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd

v1 è l’HMAC-SHA256 in esadecimale di "{t}.{raw_body}" con il vostro secret completo (whsec_...) come chiave. Per verificare:

  1. leggete il corpo grezzo della richiesta (prima di qualsiasi parsing JSON);
  2. ricalcolate l’HMAC e confrontatelo in tempo costante con ciascun valore v1= dell’intestazione;
  3. rifiutate l’evento se t dista più di 5 minuti da adesso (protezione da replay);
  4. deduplicate su Meetingize-Event-Id (le consegne avvengono almeno una volta).

Durante una rotazione del secret, il vecchio secret resta valido per 24 ore e l’intestazione contiene due valori v1=.

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 example
from flask import Flask, request, abort
app = 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 "", 204
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 received
app.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);
});
Terminal window
BODY_FILE=event.json # raw body as received
HEADER='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"

Anche la CLI meetingize dispone di meetingize webhooks verify.

  • Il vostro endpoint deve rispondere 2xx entro 10 secondi. I reindirizzamenti non vengono seguiti. Eseguite il lavoro in modo asincrono e rispondete rapidamente.
  • Le consegne fallite vengono ritentate dopo 1 min, 5 min, 30 min, 2 h, 6 h, 12 h e 24 h (8 tentativi in totale), poi contrassegnate come failed.
  • Dopo 15 tentativi falliti consecutivi l’endpoint viene disattivato (disabled_reason: "too_many_failures") e il proprietario riceve un’email. Riattivatelo con PATCH /v1/webhook_endpoints/{id} {"enabled": true} o dall’app web.
  • Il registro delle consegne (stato, codice HTTP, primo 1 KB della vostra risposta, durata, prossimo tentativo) è visibile nell’app web e con GET /v1/webhook_endpoints/{id}/deliveries, conservato 30 giorni.
  • L’ordine non è garantito. Usate created e lo stato del job, non l’ordine di arrivo.

POST /v1/webhook_endpoints/{id}/rotate_secret restituisce un nuovo secret. Entrambi i secret firmano le consegne per 24 ore, il che vi lascia il tempo di distribuire quello nuovo.