Discord-Api-Endpoints icon indicating copy to clipboard operation
Discord-Api-Endpoints copied to clipboard

Discord API Account Creation Endpoint

Open 0w9 opened this issue 3 years ago • 25 comments

Hello,

how do i use the /auth/register endpoint to register a account?

Congrats

0w9 avatar Apr 28 '21 18:04 0w9

Hello,

You have to send a POST request with the following payload:

{
  "fingerprint": "",
  "email": "",
  "username": "",
  "password": "",
  "invite": null,
  "consent": true,
  "date_of_birth": "2000-01-01",
  "gift_code_sku_id": null,
  "captcha_key": null
}

If the request is successful, a status code 201 is returned along with a JSON body containing a token value.

greg6775 avatar Apr 28 '21 19:04 greg6775

Thank you for the reply! What is the fingerprint in this case?

The captcha key is the sitekey of the hcaptcha, right? Do the values of fingerprint and captcha change?

0w9 avatar Apr 28 '21 19:04 0w9

You can get the value for the fingerprint by sending a POST request to /auth/fingerprint. I believe a fingerprint can only be used once. And no, I don't think that the captcha key is the sitekey. But I am not sure about this. Keep me updated if you figure it out.

greg6775 avatar Apr 28 '21 19:04 greg6775

Thank you so much for the help. I will let you know when I made a call that worked.

0w9 avatar Apr 28 '21 19:04 0w9

Looks like there is not api for the fingerprint... any idea how to get this?

0w9 avatar Apr 29 '21 16:04 0w9

You can get the value for the fingerprint by sending a POST request to /auth/fingerprint.

Did you try this?

greg6775 avatar Apr 29 '21 16:04 greg6775

Yes. https://discord.com/api/auth/fingerprint retuns me a {"message": "405: Method Not Allowed", "code": 0}

0w9 avatar Apr 29 '21 16:04 0w9

Use https://discord.com/api/v9/auth/fingerprint instead. You forgot to specify an API version.

greg6775 avatar Apr 29 '21 16:04 greg6775

Oh, yes. xD Is there anything i need to specify in the headers?

0w9 avatar Apr 29 '21 16:04 0w9

No.

greg6775 avatar Apr 29 '21 16:04 greg6775

Okay, because i still get a {"message": "405: Method Not Allowed", "code": 0}.

0w9 avatar Apr 29 '21 16:04 0w9

Did you send a POST request? And you may have to specify a "Host" value as a header.

greg6775 avatar Apr 29 '21 16:04 greg6775

Oh i got it now... it was a missing user agent.

0w9 avatar Apr 29 '21 16:04 0w9

{ "fingerprint": "837361317714722836.XXX" }

0w9 avatar Apr 29 '21 16:04 0w9

Yeah. that's the fingerprint. But it is very weird that you have to specify a user agent. For me it is working without the specification of one. Have you figured out a solution for the captcha_key field yet?

greg6775 avatar Apr 29 '21 16:04 greg6775

No not yet, but i think it is:

  1. The site-key or
  2. The soloution-key of the captcha

The soulution can be gotten by using a hcaptcha-solve api (2captcha.com), getting the sitekey, make a request to the 2captcha API and get the captcha-key.

0w9 avatar Apr 29 '21 16:04 0w9

Yeah, it is the solution key. But the 2captcha API wasn't free. Am I right?

greg6775 avatar Apr 29 '21 16:04 greg6775

Yes, it was like 0,001$ per captcha, but that is okay for me. The problem is that there is not other method because 2captcha just has tons of people solving them on a dashboard 24/7.

0w9 avatar Apr 29 '21 16:04 0w9

I just need to figure out how this can work the best. I think i need to use bs4 to get the site-key, make a request to 2captcha and then get the fingerprint + register the account.

0w9 avatar Apr 29 '21 16:04 0w9

hey @GregTCLTK what's next after the /auth/register endpoint? i currently get a 201 and a token. Thanks.

taytanqbpass avatar Nov 10 '21 14:11 taytanqbpass

After you got the token, you're able to use the other API endpoints. Just don't forget to include the token you received in the request.

greg6775 avatar Nov 11 '21 02:11 greg6775

hey @GregTCLTK thank you for the response. do you have a discord? I would like to ask more questions regarding this. Thanks.

taytanqbpass avatar Nov 11 '21 13:11 taytanqbpass

i get 400 captcha_key:(1) ['invalid-response'] with all the correct info and a valid captcha key solved by 2captcha does anyone know why i would get this?

RELATI0N avatar Jun 04 '22 00:06 RELATI0N

我得到 400 个 captcha_key:(1) ['invalid-response'],其中包含所有正确的信息和由 2captcha 解决的有效验证码密钥,有人知道我为什么会得到这个吗?

me too 。 I canot pass

JackGod001 avatar Dec 07 '22 16:12 JackGod001

i get 400 captcha_key:(1) ['invalid-response'] with all the correct info and a valid captcha key solved by 2captcha does anyone know why i would get this?

Keep in mind that Discord switched from reCAPTCHA to hCAPTCHA a while back. Therefore, you have to specify a hCAPTCHA key for the captcha_key field.

greg6775 avatar Dec 17 '22 16:12 greg6775