'discord making me verify email when certain API requests are made
Is there any way to get around this problem? My code looks like this:
import requests
token = "not gonna leak my token like I did last time lmao"
guild_id = "798596724649099305"
headers = {"Authorization": token,"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36", "Content-Type": "application/json", }
base_url = "https://discord.com/api/v8"
members_url = base_url + "/guilds/" + guild_id + "/members"
response = requests.get(members_url, headers=headers)
print(response)
Is there any way to get around this. I am aware this is most likely a security measure by discord. When I run this code I get a 403 response code. Then if I look in the discord app I get an orange pop up asking me to verify my email where I have to complete a captcha. Am I missing something here?
Solution 1:[1]
Has to do with TLS mate. Discord uses Cloudflare. Cloudflare has some basic TLS fingerprinting, you can use a cloudflare solver like:
Or make/fork a TLS client to get around it. Golang has some good TLS clients, I don't think there are any good, open source, python TLS clients.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Lafftar |