Guide to how Webhooks work.

What are Webhooks?

Webhooks is a POST request that is sent from botlist.space to your server once an action is completed. In this case, webhooks are used when a user upvotes a bot. Once the upvote is registered, the request is sent to the URL that was specified in the Edit page of your bot.

Genuine Authentication

In each webhook request will contain an Authorization header, which you should compare to your bot token in a config to confirm that this request was indeed from us, and not someone else who got a hold of your webhook URL. Anyone who gets your webhook URL can send a fake request, acting as if they were botlist.space, and receiving rewards they weren't meant for.

Use Cases

Typically, webhooks shouldn't be used unless you provide users with a benefit for upvoting. Upvoting benefits both the bot owner and the user, by providing a incremental boost to the front page on that bot, and giving the user a reward in the bot. Here are some examples of how it can be used:

  • Bot has an economy system, giving users $100 on each upvote.

  • User receives some sort of badge for repetitive upvoting.

  • User receives a role in a bot support server for continuous upvotes.

Request Structure

"site": "botlist.space", // String
"bot": "508415615036424192", // String
"user": { // Object
"id": "507329700402561045", // String
"username": "PassTheMayo", // String
"discriminator": "1281", // String
"avatar": "...", // String
"short_description": "..." // ?String
"timestamp": 1546190816830 // Number

Discord Webhooks

If you only want your upvote webhooks to be used for logging, we also accept that. If you paste your Discord Webhook URL as the URL for the botlist.space Webhook, we will recognize and format the webhook to show who upvoted, and at what time.