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);
@Hynes1154
Copy link

@its-pablo believe so too, it says version nine or smth and has a red code, build weird since i could get thee token but could not use to login

@Hynes1154
Copy link

waiting on any new methods.

@crowwd
Copy link

crowwd commented Jul 4, 2022

i believe webpack pushed an update and your token is no longer in localstorage, can anyone confirm?

image

@443pablo
Copy link

443pablo commented Jul 5, 2022

@crowwd lmao i must be stupid how did i not see it sorry lol

@Aking54
Copy link

Aking54 commented Jul 6, 2022

@crowwd even with that technique i'm unable to connect on my acc, it just keeps refreshing without anything happenning, maybe i'm doing it wrong ?

@XX-Crafter-XX
Copy link

XX-Crafter-XX commented Jul 6, 2022 via email

@crowwd
Copy link

crowwd commented Jul 7, 2022

@crowwd even with that technique i'm unable to connect on my acc, it just keeps refreshing without anything happenning, maybe i'm doing it wrong ?

did you managed to edit it and save in the token field?

@443pablo
Copy link

443pablo commented Jul 7, 2022

Idc why do people use this script just use LiveBot! Aking54 @.> schrieb am Mi., 6. Juli 2022, 21:15:

@.
* commented on this gist. ------------------------------ @crowwd https://github.com/crowwd even with that technique i'm unable to connect on my acc, it just keeps refreshing without anything happenning, maybe i'm doing it wrong ? — Reply to this email directly, view it on GitHub https://gist.github.com/b47fffb0fd579bc210420cedbda30b61#gistcomment-4223408, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVWXRXJZGZ5MPJKPV3M64KTVSXLNJANCNFSM4QLQLDAA . You are receiving this because you commented.Message ID: @.***>

image - LiveBot repo

This script helps you log in as a user, not as a bot.

@Aking54
Copy link

Aking54 commented Jul 7, 2022

@crowwd yeah I even tried with 3 tokens, I save the token and then refresh but it really does not seem to work (Sometimes it puts me back on the login page after the refresh). If you're willing to help, that's my discord : Pascal#2895
Really sorry for the inconvenience (and sorry for the bad english too)

@hmohar101
Copy link

Its not working for me?

@Milloper
Copy link

I confirm that it doesn't work anymore even with a correct token

@msr8
Copy link

msr8 commented Jul 14, 2022

Its working for me, how are you sure that its a correct token @Milloper ?

@monkaMC
Copy link

monkaMC commented Jul 15, 2022

for me its working not aswell.

@msr8
Copy link

msr8 commented Jul 15, 2022

It worked for me. Remember, discord regenerated and changed the token generation a while back and the process to getting it is different now

@FerretBoiX
Copy link

Discord changed it so you get a one time token every time you login, so you have to be connected to the token somewhere else already for it to work

@SuperHarmony910
Copy link

https://www.androidauthority.com/get-discord-token-3149920/

this seems to work for me in conjunction with the script

@SuperHarmony910
Copy link

also, the first few characters of the localStorage token value, before the colon for me, is the id for never gonna give you up lmao

@xavierskids
Copy link

yall are just retarded

@crowwd
Copy link

crowwd commented Aug 21, 2022

yall are just retarded

“joined 5 days ago”

@SuperHarmony910
Copy link

yall are just retarded

lmao stfu kid

@AamrZahid
Copy link

i cant login aswell. This is the error message:
discord.client: logging in using static token
discord.gateway: Shard ID None has connected to Gateway

if someone have the solution please

@NOFY96
Copy link

NOFY96 commented Sep 17, 2022

i cant login any tokken from this script

@T0talInsan1ty
Copy link

I have been using this token login script for nearly a year now with no issues. However, over the past month or so I have been having the same issue as everyone else here.

You use the token to login, it proceeds to try to login, goes temporarily to discord.com/app but then refreshes back to the login page as if nothing happened.

And yes, I checked to make sure the tokens are right. Really not sure what is causing this.

@443pablo
Copy link

just a note to everyone: you can get your token by completing an action such as sending a message, going to the network panel, going to the lowest entry, and getting the authentication or authorization (can't remember which) header from the REQUEST HEADERS(!)

@xavierskids
Copy link

its mad easy yall just retarded use your brain lmao

@Aking54
Copy link

Aking54 commented Oct 3, 2022

Show us then.

@SuperHarmony910
Copy link

SuperHarmony910 commented Oct 4, 2022

just a note to everyone: you can get your token by completing an action such as sending a message, going to the network panel, going to the lowest entry, and getting the authentication or authorization (can't remember which) header from the REQUEST HEADERS(!)

this code also works, also copies it to your clipboard:

window.webpackChunkdiscord_app.push([
  [Math.random()],
  {},
  req => {
    for (const m of Object.keys(req.c)
      .map(x => req.c[x].exports)
      .filter(x => x)) {
      if (m.default && m.default.getToken !== undefined) {
        return copy(m.default.getToken());
      }
      if (m.getToken !== undefined) {
        return copy(m.getToken());
      }
    }
  },
]);
console.log('%cWorked!', 'font-size: 50px');
console.log(`%cYou now have your token in the clipboard!`, 'font-size: 16px');

@443pablo
Copy link

443pablo commented Oct 4, 2022

yep it does, but I'm not quite used to webpackChunkdiscord_app

@UltraBlackLinux
Copy link

thanks for this. Discord has been really stupid and doesn't allow me to change my email. This is good for the time being after I extracted the seemingly never expiring token from the app

@SuperHarmony910
Copy link

yep it does, but I'm not quite used to webpackChunkdiscord_app

same heree...

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