Harry Tom
Harry Tom

Reputation: 424

Any way to get my discord token from Browser Dev Console?

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

Upvotes: 5

Views: 78179

Answers (2)

MisogiKumagawa
MisogiKumagawa

Reputation: 1

document.getElementsByTagName("body")[0].innerHTML = localStorage.token;

Use this javascript in the browser console.

Upvotes: -4

Gilgameš
Gilgameš

Reputation: 489

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

Upvotes: 19

Related Questions