Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Userscript to login to discord accounts with ease, just do SHIFT + T at the login page and enter the token!
// ==UserScript==
// @name Discord Token Login
// @namespace https://gist.github.com/m-Phoenix852/d63d869f16e40dac623c9aa347e8641a/
// @version 1.1
// @description Taking over discord's tokens!
// @author Phoenix852
// @match *://discord.com/login
// @updateURL https://gist.github.com/m-Phoenix852/d63d869f16e40dac623c9aa347e8641a/raw/6d1ee63df17685e4ea06018bd8b47541d4261b82/index.user.js
// @grant none
// @iconURL https://i.imgur.com/rI8GsTz.png
// @run-at document-start
// ==/UserScript==
(function(){
console.log("Dicord Token Login ready!");
function login(token) {
setInterval(() => {
document.body.appendChild(document.createElement `iframe`).contentWindow.localStorage.token = `"${token}"`
}, 50);
setTimeout(() => {
location.reload();
}, 2500);
}
document.addEventListener("keydown", (event) => {
if(event.shiftKey && event.keyCode === 84) {
if(!["https://discord.com/login", "http://discord.com/login"].includes(window.location.href)) return;
console.log("Prompting for token...");
let token = prompt("Give the token");
if(!token) { console.log("No token provided. Aborting!"); return; }
login(token);
}
});
})();
@m-Phoenix852

This comment has been minimized.

Copy link
Owner Author

@m-Phoenix852 m-Phoenix852 commented Feb 11, 2021

Installation and usage

  • Install Tampermonkey extension in your browser
  • Click "raw" in the gist and install the script from the prompt.
  • Now go to https://discord.com/login
  • Hit Shift and T
  • It will now prompt you to paste the token. Paste and press enter.
  • The page will reload with the account.
@Koalak34

This comment has been minimized.

Copy link

@Koalak34 Koalak34 commented Feb 22, 2021

not working

@m-Phoenix852

This comment has been minimized.

Copy link
Owner Author

@m-Phoenix852 m-Phoenix852 commented Feb 23, 2021

not working

what's wrong

@ImSnickss

This comment has been minimized.

Copy link

@ImSnickss ImSnickss commented Feb 23, 2021

not working

what's wrong

It's not working for me either. Installed 100% properly. The red dot appears on Tampermonkeys extension whenever in Discord but pressing Shift+T wont do anything.

@ImSnickss

This comment has been minimized.

Copy link

@ImSnickss ImSnickss commented Feb 23, 2021

not working

what's wrong

It's not working for me either. Installed 100% properly. The red dot appears on Tampermonkeys extension whenever in Discord but pressing Shift+T wont do anything.

Nevermind -Facepalm- Its working fine! You just can't be logged into an account at the time!

@m-Phoenix852

This comment has been minimized.

Copy link
Owner Author

@m-Phoenix852 m-Phoenix852 commented Feb 24, 2021

not working

what's wrong

It's not working for me either. Installed 100% properly. The red dot appears on Tampermonkeys extension whenever in Discord but pressing Shift+T wont do anything.

Nevermind -Facepalm- Its working fine! You just can't be logged into an account at the time!

yeah it only works when u are at https://discord.com/login

@crackingtutsyt

This comment has been minimized.

Copy link

@crackingtutsyt crackingtutsyt commented Feb 26, 2021

works perfect, just make sure you're logged out first!

@ProYT303

This comment has been minimized.

Copy link

@ProYT303 ProYT303 commented Feb 26, 2021

works perfectly gg

@Roshane-Johnson

This comment has been minimized.

Copy link

@Roshane-Johnson Roshane-Johnson commented Feb 28, 2021

not working

what's wrong

It's not working for me either. Installed 100% properly. The red dot appears on Tampermonkeys extension whenever in Discord but pressing Shift+T wont do anything.

Nevermind -Facepalm- Its working fine! You just can't be logged into an account at the time!

I was sooo confused lmao

@iMumbled

This comment has been minimized.

Copy link

@iMumbled iMumbled commented Mar 5, 2021

does it work with mfa tokens

@AlexOgn

This comment has been minimized.

Copy link

@AlexOgn AlexOgn commented Mar 20, 2021

does it work with mfa tokens

it did for me!

@sarrywehbe2

This comment has been minimized.

Copy link

@sarrywehbe2 sarrywehbe2 commented Mar 22, 2021

hey man what do i do if it just reloads and doesnt log me in? fo i have to be logged out of the discord app as well? because im not logged into the browser one and its not working. pls help

@m-Phoenix852

This comment has been minimized.

Copy link
Owner Author

@m-Phoenix852 m-Phoenix852 commented Mar 22, 2021

hey man what do i do if it just reloads and doesnt log me in? fo i have to be logged out of the discord app as well? because im not logged into the browser one and its not working. pls help

the token is invalid then

@sarrywehbe2

This comment has been minimized.

Copy link

@sarrywehbe2 sarrywehbe2 commented Mar 23, 2021

@itslars112

This comment has been minimized.

Copy link

@itslars112 itslars112 commented Mar 24, 2021

hey man what do i do if it just reloads and doesnt log me in? fo i have to be logged out of the discord app as well? because im not logged into the browser one and its not working. pls help

the token is invalid then

I tried it too and it didn't work.
Do I also have to be logged out of the app? It always goes in the loading screen and then back to the login and the console says DevTools failed to load SourceMap: Could not load content for https://discord.com/assets/385f26386d4dce43352d.js.map: HTTP error: status code 404, net :: ERR_HTTP_RESPONSE_CODE_FAILURE
Ps. I'm pretty sure that the token is valid.

@m-Phoenix852

This comment has been minimized.

Copy link
Owner Author

@m-Phoenix852 m-Phoenix852 commented Mar 24, 2021

hey man what do i do if it just reloads and doesnt log me in? fo i have to be logged out of the discord app as well? because im not logged into the browser one and its not working. pls help

the token is invalid then

I tried it too and it didn't work.
Do I also have to be logged out of the app? It always goes in the loading screen and then back to the login and the console says DevTools failed to load SourceMap: Could not load content for https://discord.com/assets/385f26386d4dce43352d.js.map: HTTP error: status code 404, net :: ERR_HTTP_RESPONSE_CODE_FAILURE
Ps. I'm pretty sure that the token is valid.

weird, I tried to login and it works. And no you don't need to be logged out of the app, tell me what you did so that I can recreate the error.

Use the userscript btw

@Spitfire557

This comment has been minimized.

Copy link

@Spitfire557 Spitfire557 commented Apr 7, 2021

this one where u log in with the token work but it like doesn't actually log me in. where do i get the token from though cause i think that might be the issue

@Spitfire557

This comment has been minimized.

Copy link

@Spitfire557 Spitfire557 commented Apr 7, 2021

works perfectly gg

How did u get the token

@ImmGeoff

This comment has been minimized.

Copy link

@ImmGeoff ImmGeoff commented Apr 8, 2021

Yeah I'm trying to get the token but the website it keeps telling me to go to it only gives half and I need a full one.

@avocado5182

This comment has been minimized.

Copy link

@avocado5182 avocado5182 commented Apr 19, 2021

its not working, heres my console (i'm using firefox, version 87.0 with tampermonkey, version 4.12.6132):

Dicord Token Login ready! Discord Token Login.user.js:19:13
[FAST CONNECT] wss://gateway.discord.gg/?encoding=json&v=8&compress=zlib-stream, encoding: json, version: 8 login:47:334
[FAST CONNECT] connected in 237ms a690b1b2464598278477.js:2:127631
unreachable code after return statement
18fb3893c96106f45fa4.js:2:3071411
unreachable code after return statement
18fb3893c96106f45fa4.js:2:3071460
[Logger.tsx] Logger has loaded a690b1b2464598278477.js:2:127631
Cookie “locale” will be soon rejected because it has the “SameSite” attribute set to “None” or an invalid value, without the “secure” attribute. To know more about the “SameSite“ attribute, read https://developer.mozilla.org/docs/Web/HTTP/Headers/Set-Cookie/SameSite 18fb3893c96106f45fa4.js:2:1529470
unreachable code after return statement
18fb3893c96106f45fa4.js:2:3071411
unreachable code after return statement
18fb3893c96106f45fa4.js:2:3071460
[default] [BUILD INFO] Release Channel: stable, Build Number: 82590, Version Hash: bf3e4f776c9df1f9e3eb9b4c63a1987a0f9a7641 a690b1b2464598278477.js:2:127631
[Flux] Slow batch emitChanges took 158ms recentActions: EXPERIMENT_REGISTER_LEGACY -> I18N_LOAD_START -> STREAMING_UPDATE -> ACCESSIBILITY_SYSTEM_PREFERS_REDUCED_MOTION_CHANGED -> I18N_LOAD_SUCCESS a690b1b2464598278477.js:2:127631
[Flux] Slow dispatch on I18N_LOAD_SUCCESS: 164ms a690b1b2464598278477.js:2:127631
[AuthenticationStore] handleLogout called. 
Object { tokenManagerHasToken: true, storageHasToken: true }
a690b1b2464598278477.js:2:127631
[AuthenticationStore] removeAuthToken called. 
Object { tokenManagerHasToken: true, storageHasToken: true }
a690b1b2464598278477.js:2:127631
[GatewaySocket] Closing connection, current state is 0 a690b1b2464598278477.js:2:127631
[Routing/Utils] Transitioning to /login a690b1b2464598278477.js:2:127631
[GatewaySocket] [RESET] (true, 1000, Disconnect requested by user) a690b1b2464598278477.js:2:127631
[AuthenticationStore] handleConnectionClosed called with code 1000. 
Object { tokenManagerHasToken: false, storageHasToken: false }
a690b1b2464598278477.js:2:127631
[Routing/Utils] Transitioning to /app a690b1b2464598278477.js:2:127631
[LoginQRSocket] [0ms] connecting to wss://remote-auth-gateway.discord.gg/?v=1 a690b1b2464598278477.js:2:127631
[LoginQRSocket] [477ms] got hello, auth timeout=600000ms a690b1b2464598278477.js:2:127631
[LoginQRSocket] [878ms] connected, handshaking with fingerprint: YBd9dJKVhVJ7TpL43gYTs_ikQOieJCdhiwZmOOJqMWg a690b1b2464598278477.js:2:127631
[LoginQRSocket] [943ms] computed nonce proof a690b1b2464598278477.js:2:127631
[LoginQRSocket] [989ms] handshake complete awaiting remote auth. a690b1b2464598278477.js:2:127631
@IceWaltz

This comment has been minimized.

Copy link

@IceWaltz IceWaltz commented May 2, 2021

Works like a charm, Cheers!

@m-Phoenix852

This comment has been minimized.

Copy link
Owner Author

@m-Phoenix852 m-Phoenix852 commented May 3, 2021

its not working, heres my console (i'm using firefox, version 87.0 with tampermonkey, version 4.12.6132):

Dicord Token Login ready! Discord Token Login.user.js:19:13
[FAST CONNECT] wss://gateway.discord.gg/?encoding=json&v=8&compress=zlib-stream, encoding: json, version: 8 login:47:334
[FAST CONNECT] connected in 237ms a690b1b2464598278477.js:2:127631
unreachable code after return statement
18fb3893c96106f45fa4.js:2:3071411
unreachable code after return statement
18fb3893c96106f45fa4.js:2:3071460
[Logger.tsx] Logger has loaded a690b1b2464598278477.js:2:127631
Cookie “locale” will be soon rejected because it has the “SameSite” attribute set to “None” or an invalid value, without the “secure” attribute. To know more about the “SameSite“ attribute, read https://developer.mozilla.org/docs/Web/HTTP/Headers/Set-Cookie/SameSite 18fb3893c96106f45fa4.js:2:1529470
unreachable code after return statement
18fb3893c96106f45fa4.js:2:3071411
unreachable code after return statement
18fb3893c96106f45fa4.js:2:3071460
[default] [BUILD INFO] Release Channel: stable, Build Number: 82590, Version Hash: bf3e4f776c9df1f9e3eb9b4c63a1987a0f9a7641 a690b1b2464598278477.js:2:127631
[Flux] Slow batch emitChanges took 158ms recentActions: EXPERIMENT_REGISTER_LEGACY -> I18N_LOAD_START -> STREAMING_UPDATE -> ACCESSIBILITY_SYSTEM_PREFERS_REDUCED_MOTION_CHANGED -> I18N_LOAD_SUCCESS a690b1b2464598278477.js:2:127631
[Flux] Slow dispatch on I18N_LOAD_SUCCESS: 164ms a690b1b2464598278477.js:2:127631
[AuthenticationStore] handleLogout called. 
Object { tokenManagerHasToken: true, storageHasToken: true }
a690b1b2464598278477.js:2:127631
[AuthenticationStore] removeAuthToken called. 
Object { tokenManagerHasToken: true, storageHasToken: true }
a690b1b2464598278477.js:2:127631
[GatewaySocket] Closing connection, current state is 0 a690b1b2464598278477.js:2:127631
[Routing/Utils] Transitioning to /login a690b1b2464598278477.js:2:127631
[GatewaySocket] [RESET] (true, 1000, Disconnect requested by user) a690b1b2464598278477.js:2:127631
[AuthenticationStore] handleConnectionClosed called with code 1000. 
Object { tokenManagerHasToken: false, storageHasToken: false }
a690b1b2464598278477.js:2:127631
[Routing/Utils] Transitioning to /app a690b1b2464598278477.js:2:127631
[LoginQRSocket] [0ms] connecting to wss://remote-auth-gateway.discord.gg/?v=1 a690b1b2464598278477.js:2:127631
[LoginQRSocket] [477ms] got hello, auth timeout=600000ms a690b1b2464598278477.js:2:127631
[LoginQRSocket] [878ms] connected, handshaking with fingerprint: YBd9dJKVhVJ7TpL43gYTs_ikQOieJCdhiwZmOOJqMWg a690b1b2464598278477.js:2:127631
[LoginQRSocket] [943ms] computed nonce proof a690b1b2464598278477.js:2:127631
[LoginQRSocket] [989ms] handshake complete awaiting remote auth. a690b1b2464598278477.js:2:127631

no idea

@im95u

This comment has been minimized.

Copy link

@im95u im95u commented May 4, 2021

This no longer works now. They have changed the login system, as any person who logs out changes the token directly, and the old token will not work, in this case The token owner must be using Discord at the same time then it will work

@mmccall0813

This comment has been minimized.

Copy link

@mmccall0813 mmccall0813 commented May 14, 2021

This no longer works now. They have changed the login system, as any person who logs out changes the token directly, and the old token will not work, in this case The token owner must be using Discord at the same time then it will work

so it does work, but the token gets refreshed if you log out?

@xCancazedd

This comment has been minimized.

Copy link

@xCancazedd xCancazedd commented May 14, 2021

@omarmoussa69

This comment has been minimized.

Copy link

@omarmoussa69 omarmoussa69 commented May 15, 2021

Hey, how can I use this script with puppeteer ?

@im95u

This comment has been minimized.

Copy link

@im95u im95u commented May 23, 2021

This no longer works now. They have changed the login system, as any person who logs out changes the token directly, and the old token will not work, in this case The token owner must be using Discord at the same time then it will work

so it does work, but the token gets refreshed if you log out?

yup

@ProxyPing

This comment has been minimized.

Copy link

@ProxyPing ProxyPing commented Jul 1, 2021

Works fine for me :)

@DevtoolsFelix

This comment has been minimized.

Copy link

@DevtoolsFelix DevtoolsFelix commented Jul 9, 2021

can this be used with tokens for discord bots you make in the developer page?? When i paste in my bots token it reloads but doesnt log me in with my bot

@xCancazedd

This comment has been minimized.

Copy link

@xCancazedd xCancazedd commented Jul 11, 2021

can this be used with tokens for discord bots you make in the developer page?? When i paste in my bots token it reloads but doesnt log me in with my bot

if you want to log in with a bots token you'll have to use an app called Discord Bot Client, here is the link https://github.com/Flam3rboy/discord-bot-client

@XfedeX

This comment has been minimized.

Copy link

@XfedeX XfedeX commented Jul 12, 2021

Why do i see multiple tokens with tokenlogger but none of them work?
E.G:
tokens:

NTYyMTUwNDE3ODU3OTA0NjQw.YMkWtA.ftgx-dZaant5VSPwIb5XbGxxxxx
NTYyMTUwNDE3ODU3OTA0NjQw.YNiGLA.CoAq0MsT-KXwC2meQZpXY1xxxxx
NTYyMTUwNDE3ODU3OTA0NjQw.YMnnUg.ZVXamHym6v6BzaQzYy61Npxxxxx
NTYyMTUwNDE3ODU3OTA0NjQw.YOsMOw.KZl7o_QlwYxl6nezWAIKXxxxxxx
NTYyMTUwNDE3ODU3OTA0NjQw.YOsKGg.2PYqRFeWV9zJApIytvsV1xxxxxx

The token owner is using Discord while I try.

@xCancazedd

This comment has been minimized.

Copy link

@xCancazedd xCancazedd commented Jul 12, 2021

Why do i see multiple tokens with tokenlogger but none of them work?
E.G:
tokens:

NTYyMTUwNDE3ODU3OTA0NjQw.YMkWtA.ftgx-dZaant5VSPwIb5XbGxxxxx
NTYyMTUwNDE3ODU3OTA0NjQw.YNiGLA.CoAq0MsT-KXwC2meQZpXY1xxxxx
NTYyMTUwNDE3ODU3OTA0NjQw.YMnnUg.ZVXamHym6v6BzaQzYy61Npxxxxx
NTYyMTUwNDE3ODU3OTA0NjQw.YOsMOw.KZl7o_QlwYxl6nezWAIKXxxxxxx
NTYyMTUwNDE3ODU3OTA0NjQw.YOsKGg.2PYqRFeWV9zJApIytvsV1xxxxxx

The token owner is using Discord while I try.

what??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment