I'm trying to join a discord server using my account, api token and invite. But I get an error 400 and some information about the captcha. Can this problem be solved and how? Tell me please
import requests
server_invite = "9ENp6JKx"
token = "XXX"
header = {"authorization": token}
r = requests.post("https://discord.com/api/v8/invites/{}".format(server_invite), headers=header)
print(r.status_code)
print(r.text)
And the text from the console:
400
{"captcha_key": ["\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c\u0441\u044f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443."], "captcha_sitekey": "a9b5fb07-92ff-493f-86fe-352a2803b3df", "captcha_service": "hcaptcha", "captcha_rqdata": "+DPUS6IFMMYaRw+KAauASm32/u5+Vmn0ZoOgbLH9ATMi28bpXLFSv3cJ2IggZyrp6w2hpoiAqfngNK/O39T758v5/NDoWmxmtQRLi9guC1yLSQJ3SzA2SJpEIYaihOVbig2zqY4wuH74PGPVHQl2h97vRo5+vQrgAfWlNH8M", "captcha_rqtoken": "IndTSXdJbk56aVVOUWREV0w0RUJBWndvU2kxTDRoNGhEMHl4d2FKMndtVGdvR09lTFFlWEkxbzhHbEtCTnNsQnpBbEdvRHc9PWpqVS9wSjRZVWJNQXpQeE0i.YyW4wA.h-YL1dkLh1N2RveSN7AUR025yPI"}