# Discord Bot & HTTP API (/docs/stardew-valley/discord-api)



import { Step, Steps } from 'fumadocs-ui/components/steps';

JunimoServer includes an optional **HTTP management API** and a **Discord bot** that shows live server status and can relay in-game chat. These are entirely optional — your farm runs fine without them.

The HTTP API Key [#the-http-api-key]

The API protects its write endpoints with an **API key**. This is **not required to play** — it's only needed if you use the API or the Discord bot.

* **Don't use the API?** Leave **HTTP API Key** blank on the Startup tab. (You can safely ignore any "Setup Required: API Key" banner.)
* **Want the API/bot?** Generate any random secret and paste it into **HTTP API Key**, then restart. Use the **same value** in your bot config.

> A good way to generate one: run `openssl rand -base64 32` on any machine, or use a password generator.

Enable the Discord bot [#enable-the-discord-bot]

<Steps>
  <Step>
    Create a Discord bot [#create-a-discord-bot]

    At the [Discord Developer Portal](https://discord.com/developers/applications), create an application + bot and copy its **token**. Invite the bot to your server with the **Message Content Intent** enabled if you want chat relay.
  </Step>

  <Step>
    Configure it on the panel [#configure-it-on-the-panel]

    On the **Startup** tab set the Discord bot token (and optional chat channel ID), make sure the **HTTP API Key** matches, then restart.
  </Step>

  <Step>
    Verify [#verify]

    The bot updates its status with your farm name and player count, and (if configured) relays chat between Discord and the in-game chat.
  </Step>
</Steps>

What the API can do [#what-the-api-can-do]

The HTTP API exposes server status, the connected player list, and invite codes — useful for custom dashboards and automation. It listens on the **API Port** (default `8080`); expose that port via an allocation if you need to reach it externally.
