Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discord API Account Creation Endpoint #4

Open
0w9 opened this issue Apr 28, 2021 · 25 comments
Open

Discord API Account Creation Endpoint #4

0w9 opened this issue Apr 28, 2021 · 25 comments

Comments

@0w9
Copy link

0w9 commented Apr 28, 2021

Hello,

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

Congrats

@greg6775
Copy link
Owner

greg6775 commented Apr 28, 2021

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.

@0w9
Copy link
Author

0w9 commented Apr 28, 2021

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?

@greg6775
Copy link
Owner

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.

@0w9
Copy link
Author

0w9 commented Apr 28, 2021

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

@greg6775 greg6775 changed the title Endpoint Discord API Account Creation Endpoint Apr 28, 2021
@greg6775 greg6775 pinned this issue Apr 28, 2021
@0w9
Copy link
Author

0w9 commented Apr 29, 2021

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

@greg6775
Copy link
Owner

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

Did you try this?

@0w9
Copy link
Author

0w9 commented Apr 29, 2021

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

@greg6775
Copy link
Owner

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

@0w9
Copy link
Author

0w9 commented Apr 29, 2021

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

@greg6775
Copy link
Owner

No.

@0w9
Copy link
Author

0w9 commented Apr 29, 2021

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

@greg6775
Copy link
Owner

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

@0w9
Copy link
Author

0w9 commented Apr 29, 2021

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

@0w9
Copy link
Author

0w9 commented Apr 29, 2021

{ "fingerprint": "837361317714722836.XXX" }

@greg6775
Copy link
Owner

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?

@0w9
Copy link
Author

0w9 commented Apr 29, 2021

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.

@greg6775
Copy link
Owner

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

@0w9
Copy link
Author

0w9 commented Apr 29, 2021

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
Copy link
Author

0w9 commented Apr 29, 2021

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.

@taytanqbpass
Copy link

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

@greg6775
Copy link
Owner

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.

@taytanqbpass
Copy link

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

@IllegalWeaponsDealer
Copy link

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?

@JackGod001
Copy link

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

me too 。 I canot pass

@greg6775
Copy link
Owner

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.

Repository owner deleted a comment from DavideStagni Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants
@JackGod001 @greg6775 @taytanqbpass @0w9 @IllegalWeaponsDealer and others