Skip to content

Webhooks

mte edited this page Jun 13, 2022 · 6 revisions

Endpoints for manipulating discord webhooks

Current Available Endpoints:

  • /webhooks/check
  • /webhooks/send
  • /webhooks/delete
  • /webhooks/spam

Note that all endpoints start by checking the provided webhook, and will return relating status codes/text

Python examples

Check if a webhook url is valid

import requests

data = {
    'webhookurl': 'https://discord.com/api/webhooks/978987262433972254/OeW9gbIMVUbH8gGPgy3gKvTPZhCiPHaHFqxrkQPJDIB4x8ECw1P1SVILCF-kSBtDDRra'
}

req = requests.post('https://utilities.tk/webhooks/check', json=data)

print(req.status_code)
print("\n"+req.text)

Output:

200

Valid webhook!

Send message to webhook

import requests

data = {
    'webhookurl': 'https://discord.com/api/webhooks/978987262433972254/OeW9gbIMVUbH8gGPgy3gKvTPZhCiPHaHFqxrkQPJDIB4x8ECw1P1SVILCF-kSBtDDRra',
    'message': 'hello'
}

req = requests.post('https://utilities.tk/webhooks/send', json=data)

print(req.status_code)
print("\n"+req.text)

Output:

200

Sent message to webhook!

Delete a webhook

import requests

data = {
    'webhookurl': 'https://discord.com/api/webhooks/978987262433972254/OeW9gbIMVUbH8gGPgy3gKvTPZhCiPHaHFqxrkQPJDIB4x8ECw1P1SVILCF-kSBtDDRra'
}

req = requests.post('https://utilities.tk/webhooks/delete', json=data)

print(req.status_code)
print("\n"+req.text)

Output:

200

Deleted webhook!

Spam a message or multiple messages to a webhook

import requests

# Spam one message
data = {
    'webhookurl': 'https://discord.com/api/webhooks/978987262433972254/OeW9gbIMVUbH8gGPgy3gKvTPZhCiPHaHFqxrkQPJDIB4x8ECw1P1SVILCF-kSBtDDRra',
    'message': 'hello'
}

# Spam a random message from provided list
# use ":|:" to separate each message, and make sure to change the key to messageS rather than message
data = {
    'webhookurl': 'https://discord.com/api/webhooks/978987262433972254/OeW9gbIMVUbH8gGPgy3gKvTPZhCiPHaHFqxrkQPJDIB4x8ECw1P1SVILCF-kSBtDDRra',
    'messages': 'hello:|:this is another message:|:and another one:|:made by: monkeys:|:msg0123123:|:$$bills'
}


req = requests.post('https://utilities.tk/webhooks/spam', json=data)

print(req.status_code)
print("req.text)

Output:

You might see a cloudflare error page for a 524 error code, this is just because of the security time out we have setup, the task will still complete itself.

Page will stay loading until the webhook errors out, or if you don't have a PRO key, it will return a 200 status code and some text after sending 100 messages to the specified webhook. the spammer isn't affected by ratelimits, and will will wait a second or two if necessary.

Clone this wiki locally