Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save Hammer2900/1789b41705457fa16903207d56e0b899 to your computer and use it in GitHub Desktop.

Select an option

Save Hammer2900/1789b41705457fa16903207d56e0b899 to your computer and use it in GitHub Desktop.
How to Get Your Discord Token From the Browser Developer Console

How to Get Your Discord Token From the Browser Console

New method (contributed by youyoumu)

  • Open the browser console with F12 or Ctrl + Shift + I.
  • Enable mobile device emulation with Ctrl + Shift + M.
  • Paste the following code into the console and press Enter:
const iframe = document.createElement('iframe');
console.log(
  'Token: %c%s',
  'font-size:16px;',
  JSON.parse(document.body.appendChild(iframe).contentWindow.localStorage.token)
);
iframe.remove();

Alternatively, you can just go to the Application tab, then Local Storage, and find the token key under https://discord.com/ after you have enabled mobile device emulation.

Old method

Click to expand
  • Open the browser console with F12 or Ctrl + Shift + I.
  • Go to the network tab
  • Filter by Fetch/XHR
  • Choose a request that isn't an error (if there aren't any, click on a channel or server to trigger some requests.)
  • You'll find your discord token under the request headers -> authorization section. Copy and paste it from there.

image

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