17 KiB
Obtaining Token and Channel IDs
Warning
Do not share your token! A token gives full access to an account.
To reset a user token, change your account password.
To reset a bot token, click on Reset Token in the bot settings.
How to get a user token
Caution: Automating user accounts violates Discord's terms of service and may result in account termination. Use at your own risk.
Through your web browser
Prerequisite step: Navigate to discord.com and login.
In Chrome
Using the console
Press Ctrl+Shift+I (⌥+⌘+I on macOS). Chrome's DevTools tools will display.
-
Click the
Consoletab. The console will open. -
Type
(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()into the console and press Enter. The console will display your user token.
Using the network monitor
Press Ctrl+Shift+I (⌥+⌘+I on macOS). Chrome's DevTools tools will display.
Click the Networktab. The network panel will open
Press F5. The page will reload, and the network log (the lower half of the network panel) will display several entries.
Click the text box labelled Filterand typemessages. The entries will filter down to a single request namedmessages. If the request doesn't appear, switch to any other Discord channel to trigger it.
Click the entry named messages. A panel will open to the right and display details about the entry. Click theHeaderstab if it isn't already active.
Scroll through the contents of the Headerstab until you find an entry beginning withauthorization:.
Using the storage inspector
Press Ctrl+Shift+I (⌥+⌘+I on macOS). Chrome's DevTools will display.
Press Ctrl+Shift+M (⌘+Shift+M). Chrome will enter Device Mode, and the webpage will display as if on a mobile device.
If necessary, click the »at the right end of the tab bar, and clickApplication. The application panel will display.
In the menu to the right, under Storage, expandLocal Storageif necessary, then clickhttps://discord.com. The pane to the right will display a list of key-value pairs.
In the text box marked Filter, typetoken. The entries will filter down to those containing the stringtoken.
Click the tokenentry. (Note: if the token doesn't display, try refreshing by pressing F5 or ⌘+R on macOS)
Click the text box at the bottom, press Ctrl+A (⌘+A on macOS) then Ctrl+C (⌘+C on macOS) to copy the value to your clipboard.
In Firefox
Using the console
Press Ctrl+Shift+K (⌥+⌘+K on macOS). Firefox’s web developer tools will display at the bottom of the window, and the web console will display.
-
Click the
Consoletab. The console will open. -
Type
(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()into the console and press Enter. The console will display your user token.
Using the network monitor
Press Ctrl+Shift+E (⌥+⌘+E on macOS). Firefox’s web developer tools will display at the bottom of the window, and the network monitor will display.
Press F5. The page will reload, and the network request list will populate with entries.
Type messagesinto the filter. The network request list will filter out any entries not containing the stringmessages. If the request doesn't appear, switch to any other Discord channel to trigger it.
Click messages. The network request details pane will display. The headers tab should be active by default. If it isn’t, click it.
Scroll down until you see an entry labeled authorization under Request Headers.
Using the storage inspector
Press Shift+F9. Firefox’s web developer tools will display at the bottom of the window, and the storage panel will be selected.
Press Ctrl+Shift+M (⌥+⌘+M on macOS). Firefox will toggle responsive design mode, and the web page will display as if on a mobile device. (Note: Discord may steal focus and respond to the command by toggling mute. If this happens, return focus to Firefox’s web developer tools by clicking somewhere in it, then try the command again.)
In the storage tree (the list on the left side of the web developer tools panel), click Local Storage. The entry will expand, and the entry https://discord.comwill display beneath it.
In the storage tree, click https://discord.com. The table widget to the right of the storage tree will display several key-value pairs.
In the text box labelled Filter itemsat the top of the table widget, entertoken. The table will now only display entries containing the stringtoken.
Click the entry token. The sidebar will display. (Note: If the token doesn’t display, try refreshing by pressing F5.)
Through the desktop app / enabling web developer tools
By editing the settings file
-
If Discord is running, exit the application by right-clicking the icon in your taskbar tray and clicking
Quit Discord. -
Open Discord's settings file in your preferred text editor. See the following table for help finding it:
OS Stable Canary Public Test Build (PTB) Windows %APPDATA%\discord\settings.json%APPDATA%\discordcanary\settings.json%APPDATA%\discordptb\settings.jsonmacOS ~/Library/Application Support/discord/settings.json~/Library/Application Support/discordcanary/settings.json~/Library/Application Support/discordptb/settings.jsonLinux ~/.config/discord/settings.json~/.config/discordcanary/settings.json~/.config/discordptb/settings.jsonIf you use BetterDiscord, use the following table instead:
OS Stable Canary Public Test Build (PTB) Windows %APPDATA%\BetterDiscord\data\stable\settings.json%APPDATA%\BetterDiscord\data\canary\settings.json%APPDATA%\BetterDiscord\data\ptb\settings.jsonmacOS ~/Library/Application Support/BetterDiscord/data/stable/settings.json~/Library/Application Support/BetterDiscord/data/canary/settings.json~/Library/Application Support/BetterDiscord/data/ptb/settings.jsonLinux ~/.config/BetterDiscord/data/stable/settings.json~/.config/BetterDiscord/data/canary/settings.json~/.config/BetterDiscord/data/ptb/settings.json -
Insert a blank line after the first curly bracket (
{), add the text"DANGEROUS_ENABLE_DEVTOOLS_ONLY_ENABLE_IF_YOU_KNOW_WHAT_YOURE_DOING": true,to it, and save the file. Your file should resemble the following:
{
"DANGEROUS_ENABLE_DEVTOOLS_ONLY_ENABLE_IF_YOU_KNOW_WHAT_YOURE_DOING": true,
"BACKGROUND_COLOR": "#202225",
"IS_MAXIMIZED": true
}
-
Launch Discord.
-
To find your user token, continue here.
Via settings menu (BetterDiscord only)
Click the User Settings button (the gear icon to the right of your username). Discord’s settings page will open.
In the sidebar to the left, click Settingsunder theBetterDiscordgroup. BetterDiscord’s settings page will display.
In the main panel to the right, expand the Developer Settingsgroup if necessary, and toggleDevToolsto enabled.
- Press Esc. The settings page will close.
- To find your user token, continue here.
How to export with a bot token
Step 1 - Create an application
You can create a new application or use an existing one. If you want to create a new one:
- Go to Discord developer portal
- Click on New Application in the top right corner
- Enter a name for your application and click Create
Step 2 - Invite the bot to your server
The bot needs to be invited to the server you'd like to export from.
- Go to Discord developer portal
- Navigate to General Information on the left
- Copy the Application ID
- Open the following URL in your browser, replacing
YOUR_APP_IDwith the copied Client ID:
https://discord.com/oauth2/authorize?scope=bot&permissions=66560&client_id=YOUR_APP_ID
Step 3 - Ensure message content intent is enabled
If this option is not enabled, the exported files will be empty.
- Go to Discord developer portal
- Open your Application's settings
- Navigate to the Bot section on the left
- Scroll down to the Privileged Gateway Intents section
- Enable Message Content Intent by toggling the switch
Step 4 - Copy the bot token
If you don't have a bot token yet or if you've lost it, follow these steps to reset it:
- Go to Discord developer portal
- Open your Application's settings
- Navigate to the Bot section on the left
- Under Token click Reset Token
- Click Yes, do it! and authenticate to confirm
Tip
: As the token is only shown once, make sure to store it in a safe place. If you lose the token, you will have to reset it again.
Warning
Resetting the token will invalidate the old one. Any integrations relying on the old token will cease to function until they are updated.
How to get a Server ID or a Channel ID
- Open Discord Settings
- Go to the Advanced section
- Enable Developer Mode
- Right-click on the desired server or channel and click Copy Server ID or Copy Channel ID




