discord / discord-api-docs

Official Discord API Documentation
https://discord.com/developers/docs/intro
Other
5.85k stars 1.23k forks source link

Discord Token #847

Closed 1ycx closed 5 years ago

1ycx commented 5 years ago

screenshot from 2019-02-08 00-20-54

Self bots aren't supported. You shouldn't be going through the 2FA login flow on your bot either. Log in on the client, grab the token from local storage and use that token in your self bot.

Do not call /api/login or /api/auth/mfa/totp.

I repeat. Do not call /api/login or /api/auth/mfa/totp. If you are using a self bot on a 2fa enabled account, and you are automating the login and mfa flow. Your account will get banned. Instead, log in on the discord client, pop open the web inspector, (ctrl/cmd shift I), and type localStorage.token in the console to get your auth token. Pass this to the bot library instead, like you would a bot token. discord.py supports this as client.run('mfa.theTokenHere', bot=False).

Do NOT automate calling /api/login. and /api/auth/mfa/totp Your account will get banned.

I'll refer to my earlier Q&A:

Q: What about smaller/private bots? Bots that are hosted on my own user account that I use discord with. Will you ban those? A: If they become a problem, yes. Be smart and use an official bot account.

Automating the MFA flow constitutes as a problem. Do not do it.

Originally posted by @jhgg in https://github.com/discordapp/discord-api-docs/issues/69#issuecomment-223886862

When I try localStorage.token in the console, I get :

Uncaught ReferenceError: localStorage is not defined
    at <anonymous>:1:1
jhgg commented 5 years ago

Not going to help you try and run a selfbot, friend.

pokemonlover1234 commented 5 years ago

Self bots aren't just not supported, they downright aren't allowed.

1ycx commented 5 years ago

@jhgg Mister, I want to open the Discord in Vscode using this extension - https://github.com/karigari/vscode-chat. For that, I think I need a Token. It's mentioned here in the Seup docs of that repo - https://github.com/karigari/vscode-chat/blob/master/docs/DISCORD.md. BTW that way of localStorage.token was what you mentioned to use right ?

shikhir-arora commented 5 years ago

Are you trying to get a token setup for a regular bot @Kogam22 - if so, here is a good place to start, and this is the documentation for creating a proper bot application

If you want to use Rich Presence to display your status in VSCode, then just download something like this extension and it should work pretty seamlessly.

1ycx commented 5 years ago

@shikhir-arora Thanks for the help. But I don't want to run a Bot :sweat_smile: I didn't read your comment. Let me try that other extension and tell you.

PixeLInc commented 5 years ago

@Kogam22 using that extension with your user account token is not allowed. They shouldn't be encouraging that either. I wouldn't use that, or youre probably going to get banned

Still34 commented 5 years ago

As the person stated, they were trying to use a VSCode extension that directly connects to their team's chat; however, the extension instructs them to obtain a user token, which, obviously, is not allowed.

@Kogam22 your best bet is to avoid the plugin for now until they've made the switch to RPC calls as referenced by the developer here.

1ycx commented 5 years ago

@PixeLInc Surely, let me reference this thing there. That dev doesn't probably know that. Thanks for the reply.

1ycx commented 5 years ago

@shikhir-arora , Is there no way to just open the discord app in Vscode like that extension ? If none, no problem. But also @jhgg make sure to just edit your comment such that any other guy doesn't come again to ask you for a Discord Token.

shikhir-arora commented 5 years ago

@Kogam22 The extension I linked is for Rich Presence, which will update your Discord playing status with your workflow on VSCode (like this), which is a local IPC that uses Discord RPC to locally relay between your client and the application (so VSCode here). It doesn't require your user token, and it's done between your client (Discord) <--> application (VSCode).

The maintainers of that repo you are asking about likely know that it is not allowed - it's not allowed, but people still do it at their own risk. That repo requires a user token to run, so it's the same scope as a selfbot.

1ycx commented 5 years ago

@shikhir-arora

The extension I linked is for Rich Presence, which will update your Discord playing status with your workflow on VSCode (like this), which is a local IPC that uses Discord RPC to locally relay between your client and the application (so VSCode here). It doesn't require your user token, and it's done between your client (Discord) <--> application (VSCode).

Yeah I tried that. Sounds interesting.

The maintainers of that repo you are asking about likely know that it is not allowed - it's not allowed, but people still do it at their own risk. That repo requires a user token to run, so it's the same scope as a selfbot.

I didn't know that. Thanks ! Really appreciate taking out your time to help me.