5

Is there any way to see my discord token in the dev console with any javascript code?

2
  • 3
    please don't ask us how to selfbot on discord.. it's against their tos Commented May 1, 2021 at 16:14
  • Sorry, I didn't know that, I apologize for this question
    – Harry Tom
    Commented May 1, 2021 at 16:27

2 Answers 2

18

Sadly, the method posted by Scoooolzs stopped working after a recent webpack update.
Here's the new working code:

(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()

You can find a library in this repo to hook into Discord clients' functions.

(Community edit:)
Prettified:

(
    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()
3
  • 1
    Would someone care to explain how this code works? m seems to be defined within the body of an arrow function, yet is being 'emitted' via the (foo, bar) comma-operator to the filter-step. How is it not out of scope, when it is referenced for the second time?
    – P i
    Commented Oct 16, 2022 at 20:45
  • Totally love the beautified version. Thanks @P i
    – ClaytonTDM
    Commented Oct 16, 2022 at 21:42
  • How does this work?
    – Jeroi
    Commented Dec 4, 2023 at 22:07
-2
javascript:document.getElementsByTagName("body")[0].innerHTML = localStorage.token;

Use this javascript in the browser console.

0

Not the answer you're looking for? Browse other questions tagged or ask your own question.