# How to get Discord token, server and channel ID

# How to get your Discord token, Server Id and Channel Id

When you create a Discord account, a unique token is automatically assigned to you. This Discord token is distinct from your username, tag, and password, and possessing it grants access to your account. Understanding your Discord token is crucial for enhancing security and protecting your account. Below, we'll guide you on how to obtain your Discord token to ensure a safer online experience.

## TL;DR

:::highlight purple 💡
  To retrieve your Discord token, log into Discord using a web browser. Open the
  **Developer Tools** and click on **Network**. Press **F5** on your keyboard to
  reload the page. In the Filter field, type **/api** and then click on
  **library** or **science**. Proceed to the **Headers** tab, where you will find your Discord
  token under the **authorization** section. Remember to handle your token with
  utmost care and avoid sharing it with anyone to maintain the security of your
  Discord account.
:::

## What is a Discord token?

Your Discord token acts as an encrypted identifier for your account, created during the account setup process. It is a combination of alphanumeric characters, serving as an authorization code to access Discord's servers. This token verifies and authenticates each action you perform on Discord, and it also serves as a means to log into your account.

Keeping your Discord token secure is of utmost importance. If someone else gains access to your token, they could potentially compromise your account, obtaining full access to all your Discord account information. Therefore, it is essential to guard your token carefully and refrain from sharing it with anyone to maintain the security of your Discord account.

## How to get your Discord token?

Open your desktop browser and go to the Discord website. Log into your Discord account.

![log-in-on-browser.webp](https://api.apifox.com/api/v1/projects/5160896/resources/465948/image-preview)

Press **Ctrl+Shift+I** (or **Cmd+Option+I** on Mac) on your keyboard to access **Developer Tools**. Click on **Network** from the toolbar at the top.

![click-network.webp](https://api.apifox.com/api/v1/projects/5160896/resources/465949/image-preview)

Refresh the page by pressing **F5**.

![press-f5-to-reload-after-on-network.webp](https://api.apifox.com/api/v1/projects/5160896/resources/465950/image-preview)

In the "Network" section, you will see various entries. In the field labeled **Filter**, type **/api**. Among the results displayed below, click on **science**.

![type-api-in-filter-then-library.webp](https://api.apifox.com/api/v1/projects/5160896/resources/465951/image-preview)

Within the "science" entry, navigate to the **Headers** tab. Scroll down until you find the section labeled **authorization**. This is your Discord token.

![authorization-location.webp](https://api.apifox.com/api/v1/projects/5160896/resources/465952/image-preview)

## Alternative way to get your Discord token

Open your desktop browsser and go to the [Discord website](https://discord.com/channels/@me). Log into your Discord account.

Press **Ctrl+Shift+I** (or **Cmd+Option+I** on Mac) on your keyboard to access **Developer Tools**. Click on **Console** from the toolbar at the top, and paste the following code

```js
window.webpackChunkdiscord_app.push([
  [Math.random()],
  {},
  (req) => {
    for (const m of Object.keys(req.c)
      .map((x) => req.c[x].exports)
      .filter((x) => x)) {
      if (m.default && m.default.getToken !== undefined) {
        return copy(m.default.getToken())
      }
      if (m.getToken !== undefined) {
        return copy(m.getToken())
      }
    }
  },
])
console.log("%cWorked!", "font-size: 50px")
console.log(`%cYou now have your token in the clipboard!`, "font-size: 16px")
```

Press enter and your Discord token will be copied to your clipboard, which you can paste it anywhere else.

![alternative-way-to-get-your-discord-token.webp](https://api.apifox.com/api/v1/projects/5160896/resources/465953/image-preview)

## Create a dedicated Discord server and channel

It's easy to create your own private Discord server to organize your work, notes and inspiration. [Learn how to create your own Discord Server](https://support.discord.com/hc/en-us/articles/204849977-How-do-I-create-a-server-).

## Invite Midjourney Bot to your Discord server

You will need to invite Midjourney Bot to your Discord server, so it can send messages to your Discord channel. [Learn how to invite Midjourney Bot to your Discord server](https://docs.midjourney.com/docs/add-the-bot).

## How to get your Discord server/channel ID?

Open your desktop browser and go to the Discord website. Log into your Discord account. 

On the left bottom side of the screen, click on the **User Settings** icon, to the right of your username.

![user-settings-icon.webp](https://api.apifox.com/api/v1/projects/5160896/resources/465954/image-preview)

Click on **Advanced** from the left sidebar, and then click on **Developer Mode**, to enable it.

![enable-developer-mode.webp](https://api.apifox.com/api/v1/projects/5160896/resources/465955/image-preview)

Close the **User Settings**. Right-click on your Discord server name and select **Copy ID**. This is your Discord server ID.

![copy-server-id.webp](https://api.apifox.com/api/v1/projects/5160896/resources/465956/image-preview)

Right-click on your Discord channel name and select **Copy ID**. This is your Discord channel ID.

![copy-channel-id.webp](https://api.apifox.com/api/v1/projects/5160896/resources/465957/image-preview)
