Skip to main content
Use this guide when you want Rankly to push vote events to your bot or backend.

What the webhook contains

Rankly sends a signed JSON payload that looks like this:
The signature is sent in the X-Webhook-Signature header.

How to handle it

1

Expose a public HTTPS endpoint

The endpoint must be reachable from the public internet.
2

Verify the signature

Recompute the HMAC with your webhook secret and compare it to the X-Webhook-Signature header.
3

Deduplicate events

Treat the webhook as at-least-once delivery and ignore duplicates by storing a stable event fingerprint.
4

Respond quickly

Return a 2xx response before you do slow work like database updates or role grants.

Example verification

What to build with it

  • Reward a voter inside your bot
  • Log the vote in a moderation channel
  • Update a dashboard badge or vote count
  • Trigger a lightweight analytics event

Security notes

  • Keep the secret private and rotate it if it leaks.
  • Verify the exact payload you received, not a re-serialized version that may change formatting.
  • Use a unique event key to avoid double rewards.
  • Do not expose your webhook endpoint with destructive actions on the first request.

Bot API Integration

Read data on demand when a webhook is not necessary.

Public API Reference

Pull server and vote state directly from Rankly.