Skip to content

Instantly share code, notes, and snippets.

@XielQs
Last active June 10, 2025 03:14
Show Gist options
  • Save XielQs/90ab13b0c61c6888dae329199ea6aff3 to your computer and use it in GitHub Desktop.
Save XielQs/90ab13b0c61c6888dae329199ea6aff3 to your computer and use it in GitHub Desktop.
Get self discord token using console

How to get your discord token using browser console

  1. Open developer tools in browser (if you using desktop app use Ctrl+Shift+I shortcut)
  2. Switch current tab to Console
  3. Write this code and press enter
// old, not working anymore
(webpackChunkdiscord_app.push([[''],{},e=>{m=[];for(let c in e.c)m.push(e.c[c])}]),m).find(m=>m?.exports?.default?.getToken!==void 0).exports.default.getToken()
// new
iframe=document.createElement('iframe'),document.body.append(iframe),console.log('Your Discord token is %c%s','font-size:14px;',JSON.parse(iframe.contentWindow.localStorage.token)),iframe.remove()

It will print out your Discord token!

@RomjanHossain
Copy link

NICE

@daglaroglou
Copy link

javascript error: webpackChunkdiscord_app is not defined
i used the code in selenium execution script command but i get that ^^^
any ideas?

@Sajeg
Copy link

Sajeg commented Jun 3, 2025

It sadly doesn't work anymore.

@XielQs
Copy link
Author

XielQs commented Jun 5, 2025

It sadly doesn't work anymore.

Updated it!

@stellarcase
Copy link

It sadly doesn't work anymore.

Updated it!

Does not work in browser console:

Uncaught SyntaxError: "undefined" is not valid JSON
    at JSON.parse (<anonymous>)
    at <anonymous>:1:134

Also, I think Discord removed the window.localStorage property from the global window object

@XielQs
Copy link
Author

XielQs commented Jun 9, 2025

Uh maybe try code in mobile mode?

@SS-Ed-Nygma
Copy link

Uh maybe try code in mobile mode?

Yes

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