Skip to content

Instantly share code, notes, and snippets.

@XielQs
Last active October 13, 2025 10:10
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
window.webpackChunkdiscord_app.push([[Symbol()],{},o=>{for(let e of Object.values(o.c))try{if(!e.exports||e.exports===window)continue;e.exports?.getToken&&(token=e.exports.getToken());for(let o in e.exports)e.exports?.[o]?.getToken&&"IntlMessagesProxy"!==e.exports[o][Symbol.toStringTag]&&(token=e.exports[o].getToken())}catch{}}]),window.webpackChunkdiscord_app.pop(),token;

It will return your Discord token!

@Drevil8
Copy link

Drevil8 commented Aug 19, 2025

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

Didn't work for me

same

@Doggysus
Copy link

worked for only after enabling NoDevtoolsWarning plugin for me

@XielQs
Copy link
Author

XielQs commented Sep 2, 2025

Updated!!!!

@XyGear
Copy link

XyGear commented Sep 4, 2025

works ty

@devjanger
Copy link

devjanger commented Sep 17, 2025

SERVER_ID = document.URL.split("/")[4];
CHANNEL_ID = document.URL.split("/")[5];
iframe=document.createElement('iframe'),
document.body.append(iframe),
USER_ID=JSON.parse(iframe.contentWindow.localStorage.user_id_cache),
iframe.remove();
iframe=document.createElement('iframe'),
document.body.append(iframe),
TOKEN=JSON.parse(iframe.contentWindow.localStorage.token),iframe.remove();
document.write(`Server ID: ${SERVER_ID}<br/>Channel ID: ${CHANNEL_ID}<br/>Token: ${TOKEN}<br/>User ID: ${USER_ID}`);

@namtran0906001-eng
Copy link

reset bot con thỏ của trần nam

@namtran0906001-eng
Copy link

Uploading 55208b34-af35-4da6-990f-f36e41907642.jpg…

@fearrrx
Copy link

fearrrx commented Sep 24, 2025

works

@SomeRandomCpu
Copy link

const iframe = document.createElement("iframe");
console.log(
  "Token: %c%s",
  "font-size:16px;",
  JSON.parse(
    document.body.appendChild(iframe).contentWindow.localStorage.token,
  ),
);
iframe.remove();

Thank you!

@ReactorCoreDev
Copy link

Updated (print token in console)

let token;
window.webpackChunkdiscord_app.push([[Symbol()], {}, o => {
  for (let e of Object.values(o.c)) {
    try {
      if (!e.exports || e.exports === window) continue;
      if (e.exports?.getToken) {
        token = e.exports.getToken();
        console.log("Token:", token); // Print the token
      }
      for (let o in e.exports) {
        if (e.exports?.[o]?.getToken && "IntlMessagesProxy" !== e.exports[o][Symbol.toStringTag]) {
          token = e.exports[o].getToken();
          console.log("Token:", token); // Print the token
        }
      }
    } catch {}
  }
}]);
window.webpackChunkdiscord_app.pop();

@ReactorCoreDev
Copy link

(Twice)

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