Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

{"message": "401: Unauthorized", "code": 0} discord

import requests

url = "https://discord.com/api/v9/channels/11111111111/webhooks"     #Channel link to add the webhook (Example)
payload = {"name":"Tutorial"}       #Name of the webhook
header = {
    "authorization": "Bot -token-",      #REPLACE ONLY THE WORD "-token-" WITH YOUR TOKEN DONT REPLACE THE WORD "Bot "
}

webhook = requests.post(url, headers=header, json=payload)      #Its important jo say header=... , json=...
print(webhook.text) #You can remove this it is only for debugging..
 
PREVIOUS NEXT
Tagged: #discord
ADD COMMENT
Topic
Name
8+5 =