Discord Integration
Set up HookWatch to receive Discord webhooks for community events like messages, member joins, interactions, and guild updates.
Prerequisites
- A HookWatch account
- A Discord application in the Developer Portal
- A server endpoint to process webhook payloads
Step 1: Create a HookWatch endpoint
- Go to your Endpoints page
- Click "Create Endpoint"
- Enter a name like "Discord Webhooks"
- Enter your destination URL (where you want webhooks forwarded)
- Copy the generated webhook URL
Your HookWatch URL will look like:
https://hook.hookwatch.dev/wh/abc123xyzStep 2: Configure Discord interactions endpoint
- Go to the Discord Developer Portal
- Select your application
- Navigate to "General Information"
- Paste your HookWatch URL in the "Interactions Endpoint URL" field
- Click "Save Changes"
- Copy the "Public Key" — you'll need it for signature verification
Common webhook event types:
MESSAGE_CREATEMEMBER_JOINMEMBER_REMOVEGUILD_UPDATEINTERACTION_CREATEMESSAGE_REACTION_ADDCHANNEL_CREATECHANNEL_UPDATEStep 3: Verify webhooks on your server
Discord uses Ed25519 signatures to verify webhook payloads. HookWatch forwards the X-Signature-Ed25519 and X-Signature-Timestamp headers so you can
verify authenticity.
Tip
Install the tweetnacl package: npm install tweetnacl
Discord webhook headers
HookWatch forwards all Discord headers. Here are the important ones:
| Header | Description |
|---|---|
X-Signature-Ed25519 | Ed25519 signature for verification |
X-Signature-Timestamp | Timestamp used in signature computation |
Testing the integration
- Use a slash command or send a message in a channel with your bot
- Trigger an interaction (button click, select menu, etc.)
- Check your HookWatch Events page to see the events
Common issues
Endpoint verification fails
Discord sends a PING (type 1) when you set the Interactions Endpoint URL. Your server must respond with a type 1 acknowledgement. Make sure your forwarding destination handles this before setting the URL.
Signature verification fails
Ensure you're using the correct Public Key from your application's General Information page. The key must be hex-decoded before use with Ed25519 verification.
Interactions timing out
Discord requires an initial response within 3 seconds for interactions. If your server needs more time, respond with a deferred message (type 5) and follow up later.