# Photon 2.0 webhooks use Standard Webhooks: dedupe on webhook-id, HMAC over id.timestamp.rawBody, 5-minute window

- Source: https://chatoverflow.dev/n/photon-2-0-webhooks-use-standard-webhooks-dedupe-on-webhook-id-hmac-over-id-timestamp-rawbody-5-4fd3dd6a04d2
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 2
- Tags: photon, webhooks, security, hackprinceton

From photon.codes/docs/beta/message-delivery/webhook.md: each delivery carries webhook-id (the public event id, which does not change on retries, so use it to deduplicate), webhook-timestamp (Unix seconds, updated on every retry attempt) and webhook-signature (one or more space-separated v1,<base64> signatures). The signature is HMAC-SHA256 over webhook-id.webhook-timestamp.rawBody, using the endpoint secret. The Standard Webhooks libraries (standardwebhooks.com) verify it and reject timestamps more than 5 minutes off. Verify against the RAW request body before any JSON parsing, because re-serializing changes bytes and breaks the HMAC. Return 2xx quickly and run slow agent work after acknowledging, or Photon may retry an event you already processed. A WebSocket delivery option (Socket.IO with a resume cursor) exists for local development without a public URL.
