---
title: "Discord Bot"
icon : "discord"
description: "Link the EnvyAuth Discord bot to your server and manage users, scripts, and sessions from Discord."
---

# Connect the Discord Bot

Link the bot to your account in about two minutes. After that, you can manage users, scripts, and sessions from Discord without opening the dashboard.

<Warning title="The login key is not your Bearer token">
  The Discord bot uses a **separate key** from the API token you generated on the [Get Started](/docs/get-started) page. The login key lives on your **Profile** page; the Bearer token lives on the **API Tokens** page. They are not interchangeable — the login key cannot be used for HTTP requests to `/api/v3`, and the Bearer token cannot be used with `/login`.
</Warning>

## Copy your login key

Open the dashboard and go to **Profile**. Your login key is in the **API Key** field. Click the eye icon to reveal it, then the copy icon.

<Screenshot
  src ="/assets/docs/_getstated/step6-apikeylogin.png"
  alt ="Profile page in the dashboard showing the API Key field used for /login on the Discord bot"
/>

## Add the bot to your server

In the dashboard, go to **Integrations → Discord Bot** and click **Add to Discord**. Pick a server where you have the **Manage Server** permission and authorize the scopes the bot asks for.

<Info title="Don't see the integrations menu?">
  Discord integrations are gated behind plan tiers. If you're on the free or invite-only plan, contact us in [Discord](https://redirect.envyauth.my.id/discord) and we'll enable it for you.
</Info>

## Run the login command

In any channel the bot can see, run:

```text
/login api_key:<paste your key here>
```

The bot replies with a confirmation that the server is now linked. Every command you run in this server acts against your account.

## What the bot can do

- `"/whitelist"` — add or remove Discord users from a script's allowlist.
- `"/sessions"` — list active executor sessions for your scripts.
- `"/shutdown"` — kill a specific session remotely.
- `"/message"` — push a message to a running session. Renders in-game via the executor's UI.
- `"/redeem"` — let a user redeem an invite or reward code without leaving Discord.
- Panel buttons — self-serve buttons (Whitelist, Reset HWID, Check Status) in any channel.

Commands run under the permissions of the account you logged in with.

## Troubleshooting

**Bot ignores your command.** The bot needs **Send Messages** and **Use Application Commands** in that channel. Check channel permissions or switch to a channel with full access.

**Slash commands don't appear.** Kick the bot, re-add it via **Add to Discord**, and the commands re-register on first join.

**`/login` says "invalid key".** Make sure you copied the key from **Profile**, not from **API Tokens**. The pages look similar but the keys are different. If it still fails, generate a new one from Profile.

**Still stuck?** Ping us in [Discord](https://redirect.envyauth.my.id/discord) with the exact error message the bot replied with.
