What are Webhooks?

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

Genuine Authentication

In each webhook request will contain an Authorization header, which you should compare to your server 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 serverlist.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 server owner and the user, by providing a incremental boost to the front page on that server, and giving the user a reward in the server. Here are some examples of how it can be used:

  • User receives a "Regular Upvoter" role for constantly upvoting.

  • User receives currency in a roleplay server.

Request Structure

"site": "serverlist.space", // String
"server": "387812458661937152", // 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 serverlist.space Webhook, we will recognize and format the webhook to show who upvoted, and at what time.