Skip to content

Instantly share code, notes, and snippets.

@m-Phoenix852
Created August 26, 2020 07:45
Show Gist options
  • Select an option

  • Save m-Phoenix852/b47fffb0fd579bc210420cedbda30b61 to your computer and use it in GitHub Desktop.

Select an option

Save m-Phoenix852/b47fffb0fd579bc210420cedbda30b61 to your computer and use it in GitHub Desktop.
Simple script to log in to discord account using token.
let token = "your token";
function login(token) {
setInterval(() => {
document.body.appendChild(document.createElement `iframe`).contentWindow.localStorage.token = `"${token}"`
}, 50);
setTimeout(() => {
location.reload();
}, 2500);
}
login(token);
@celunah

celunah commented Aug 1, 2025

Copy link
Copy Markdown

this script btw still works on aug 1, 2025 but it doesn't work with bot tokens, only user tokens

@pxldevv

pxldevv commented Aug 1, 2025

Copy link
Copy Markdown

this script btw still works on aug 1, 2025 but it doesn't work with bot tokens, only user tokens

Like bytequill said above, bot tokens can't function in the discord web app, just wanted to make sure that was clear.

@celunah

celunah commented Aug 2, 2025

Copy link
Copy Markdown

this script btw still works on aug 1, 2025 but it doesn't work with bot tokens, only user tokens

Like bytequill said above, bot tokens can't function in the discord web app, just wanted to make sure that was clear.

I know. Only certain modified versions of the Discord app can do that.

@Genus-learner

Copy link
Copy Markdown

this script btw still works on aug 1, 2025 but it doesn't work with bot tokens, only user tokens

Interesting. this one, and similar variations havent worked for me in a while. I get an error: TypeError: _.toLowerCase is not a function

@zaydahmedx

Copy link
Copy Markdown

what do I execute it on?

@pxldevv

pxldevv commented Sep 2, 2025

Copy link
Copy Markdown

@zaydahmedx in your browser console

@Lumitani-pixel

Copy link
Copy Markdown

Arc_dsWIoW2hB8.mp4

I also got the same error but with a user token from my acount not with a bot token.

@JaimsTomas

Copy link
Copy Markdown

how to login discord account with token?

@kkrnrmenrkrjnrmrkr-a11y

Copy link
Copy Markdown

javascript:(function () {
location.reload();
var i =
document.createElem
ent('iframe');
document.body.appen
dChild(i);
prompt('Here is your token',
i.contentWindow.local
Storage.token.replace( /'/g, ''));
})();

@kkrnrmenrkrjnrmrkr-a11y

Copy link
Copy Markdown

Hjhj

@celunah

celunah commented Dec 31, 2025

Copy link
Copy Markdown

Hjhj

That's an... interesting comment. Not sure what it adds to the topic though.

@vuhai2938-maker

Copy link
Copy Markdown

Token

@nhanhuu434-pixel

Copy link
Copy Markdown

hihi

@nhanhuu434-pixel

Copy link
Copy Markdown

token

@nhanhuu434-pixel

Copy link
Copy Markdown

.

@lenkabkhirmilenmalenkabku-dev

Copy link
Copy Markdown

javascript:(function () {location.reload();var i = document.createElement('iframe');document.body.appendChild(i);prompt('Here is your token', i.contentWindow.localStorage.token.replace(/'/g, ''));})();

@ihavefriends3000

Copy link
Copy Markdown

@lenkabkhirmilenmalenkabku-dev for some reason it still just redirects me back to the login page

@tariq99043-svg

Copy link
Copy Markdown

Hmmmm

@tariq99043-svg

Copy link
Copy Markdown

bvxgjv

@tariq99043-svg

Copy link
Copy Markdown
1000016123 [](url)

@tariq99043-svg

Copy link
Copy Markdown

token

@ihavefriends3000

Copy link
Copy Markdown

@tariq99043-svg thx bro it worked

@Dragosus

Dragosus commented Jun 9, 2026

Copy link
Copy Markdown
image

Some help there pls

@douglas-cerrato

Copy link
Copy Markdown

recently been having issues trying to inject the token into the local storage manually under chromes dev tools, was only actually allowing me to sign in with the token if i toggled the device tool bar to mobile, but this code works perfectly instead of having to manually input it.

@nhandeptri

Copy link
Copy Markdown
Screenshot_20260619-185525_TikTok

@nhandeptri

Copy link
Copy Markdown

Uploading 3666920e95b9901b3a2cd4d99e4ef802.png…

@nhandeptri

Copy link
Copy Markdown

Uploading 3666920e95b9901b3a2cd4d99e4ef802.png…

@nhandeptri

Copy link
Copy Markdown

Ten la con cacc

@nhandeptri

Copy link
Copy Markdown

Cc

@nhandeptri

Copy link
Copy Markdown

Uploading 3666920e95b9901b3a2cd4d99e4ef802.png…

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