• Username: demo
    Password: demo2025

Server voting webhooks

Voting Webhook Documentation

Voting Webhook allows your server to receive notifications whenever a user votes.

1. Webhook URL

The URL your server exposes to receive vote notifications. It must accept POST requests and respond with HTTP 200 for successful delivery.

This URL can be configured in the server thread settings when creating or editing the thread.

https://yourserver.com/webhook.php

2. JSON Payload

Each vote will send the following JSON payload:

{
  "hash": "md5({webhook_secret}_{username}_{vote_date})",
  "username": "ExampleUser",
  "user_id": 123,
  "vote_date": 1700000000,
  "vote_weight": 1
}

Fields Explained

  • hash: Used to verify the request. Generated using your secret.
  • username: Name of the user who voted.
  • user_id: Unique identifier of the user.
  • vote_date: Unix timestamp when the vote was cast.
  • vote_weight: Numeric value representing the weight of the vote. Can be used to apply multipliers (e.g. bonus votes or premium users).

3. Webhook Secret

A secret string known only to your server and the voting system. It is used to generate the hash to verify authenticity.

The secret is generated automatically. You can regenerate it in thread settings at any time if needed.

4. Verification Process

  1. Receive the POST request with JSON payload.
  2. Compute the hash: md5(webhook_secret + "_" + username + "_" + vote_date)
  3. Compare with the hash from the payload.
  4. If the hash matches, process the vote; otherwise reject the request.
  5. Return HTTP 200 OK to confirm the request was accepted..
Note: Make sure your endpoint accepts external requests. Failing to return HTTP 200 may trigger retries from the voting system.
Back
Top