AI Help
How do I verify that an AI webhook event came from my provider?
Verify the signature over the original request body with the provider's supported SDK and webhook signing secret before processing the event.
Steps to follow
- Preserve the raw body and required headers through your framework. Load the signing secret from approved secret storage.
- Use the documented verifier, including timestamp checks, and reject missing or invalid signatures.
- Test valid, modified and replayed requests. Keep signature failures observable without logging secrets or private payloads.
Example in practice
Illustrative example. Changing one character of a signed test payload should cause verification to fail before a job is created.
Related AI help
- How do I avoid processing the same AI completion webhook twice?
- What should my app log when an AI API request times out?