Author Topic: Discord plugin captcha-requred  (Read 78 times)

0 Members and 1 Guest are viewing this topic.

Offline ultramageTopic starter

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Discord plugin captcha-requred
« on: 16 09 2020, 10:17:40 »
After a long time I decided to try Discord again. I added my account info, but when I try to go online, I get a popup saying "The server requires you to enter the captcha. Miranda will redirect you to a browser now". But it just opens "https://discordapp.com/app" with no meaningful parameters or anything. The legacy link then redirects to the discord.com/@me lobby screen and that's it.

Discord/src/server.cpp#L257
Code: [Select]
if (it.as_mstring() == "captcha-required") {
MessageBoxW(NULL, TranslateT("The server requires you to enter the captcha. Miranda will redirect you to a browser now"), L"Discord", MB_OK | MB_ICONINFORMATION);
Utils_OpenUrl("https://discordapp.com/app");
}

I... don't think this actually does anything? Maybe it used to?
In an earlier thread, dartraiden said that 2FA is not supported. But I don't have 2FA enabled. This is just an unsolicited captcha prompt of some sort. Or maybe Discord doesn't like the way Miranda is talking to it? Anyways, am I the only one getting this sort of issue?
 

Offline ghazan

Re: Discord plugin captcha-requred
« Reply #1 on: 18 09 2020, 07:32:52 »
ultramage,
usually the server requires you to enter the same captcha from the site
does your network log contain a link to the captcha in the packet with "captcha-required" error?
 

Offline ultramageTopic starter

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Re: Discord plugin captcha-requred
« Reply #2 on: 18 09 2020, 10:48:56 »
I see the server answering with "HTTP/1.1 400 Bad Request", nothing useful in the header, and the data is just {"captcha_key": ["captcha-required"]}.

I did a web search, found https://stackoverflow.com/questions/48100226/https-request-with-stream-context-create where a programmer tried to script the login using the same method. A reply indicates that the /auth/login api should not be used, instead bots should use the Oauth2 api and login via token. It points to https://github.com/discord/discord-api-docs/issues/69 where the developers strongly state that accessing this api is a ToS violation and a bannable offense.

I joined the official unofficial discord api discord and asked the developers about it. They reiterated that /auth/login is a private api meant for the official discord client only, and that automated login this way is not permitted. And that it's been like this since 2017. And that I should instruct you to use the Oauth2 api instead. Though, they also say that any sort of third-party client is against the ToS, and that bots using the official api are super limited in what they can do. So it might not work for this purpose.

They also said that the captcha part is also there since 2017, so idk. I only tried using the protocol once, in autumn 2017. It's possible the protocol changed.
« Last Edit: 18 09 2020, 11:51:53 by ultramage »
 

Offline ghazan

Re: Discord plugin captcha-requred
« Reply #3 on: 18 09 2020, 14:40:30 »
And that I should instruct you to use the Oauth2 api instead.
I'm afraid that OAuth2 way is permitted only to registered Discord applications or bots, while Miranda acts as a client, identifying itself as a browser :)