Discord Tokens - terminal-discord/weechat-discord GitHub Wiki

Authentication with the Discord APIs uses tokens. The client makes it difficult to access the token to prevent scams. The token is stored in localstorage, but cleared when the page loads. Here are methods of getting the token.

Python Script

find_token.py is a simple Python 3 script to search your computer for Chromium localstorage databases. It will present a list of all found tokens. If ripgrep is installed it will use that, if not, it will use find.

Manually

Method one

In the devtools menu of the website and desktop app (ctrl+shift+i or ctrl+opt+i) "Application" tab > "Local Storage" on left, discordapp.com, token entry.

When this was written, discord deletes its token from the visible table, so you may need to refresh the page (ctrl/cmd+r) and grab the token as it is refreshing.

Method two

In the devtools menu of the website and desktop app (ctrl+shift+i or ctrl+opt+i) "Network" tab and search for "science", select the first entry and find "Authorization" under Request Headers, the value is your token.

Method three

In the devtools menu of the website and desktop app (ctrl+shift+i or ctrl+opt+i) "Network" tab and search for "gateway", select the request and open the WebSocket Inspector, one of the first few frames should begin with {"op":2,"d":{"token":"<your token>"... (you may need to scroll up).

Token format

Discord token format

⚠️ **GitHub.com Fallback** ⚠️