Search
 
SCRIPT & CODE EXAMPLE
 

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..
Comment

PREVIOUS NEXT
Code Example
Python :: insert blank row in data frame 
Python :: how to get a list of all variables in memory python 
Python :: quicksort algorithm in python 
Python :: Encrypting a message in Python 
Python :: if statement python explained 
Python :: pandas excel writer append in row 
Python :: how to perform in_order traversal of a binary tree 
Python :: check if boolean is true python 
Python :: python foreach 2d array 
Python :: python poetry 
Python :: python environment 
Python :: Function to plot as many bars as you wish 
Python :: python append value to column 
Python :: len dictionary python 
Python :: Python DateTime Date Class Syntax 
Python :: Math Module cos() Function in python 
Python :: replace in python 
Python :: python selenium driver 
Python :: tensorflow data augmentation 
Python :: python declare variable 
Python :: Dynamic Form Fields Django 
Python :: list vs tuple 
Python :: percentage plot of categorical variable in python woth hue 
Python :: length of an empty array in python 
Python :: watershed segmentation 
Python :: how to add new column in django 
Python :: 3d graph python 
Python :: create a new column in pandas dataframe based on the existing columns 
Python :: python incrémentation 
Python :: django filter values with e and operator 
ADD CONTENT
Topic
Content
Source link
Name
2+2 =