Skip to main content
Authentication

Authentication

ZoarkBot uses three types of credentials: your Anthropic API key (powers the AI), your gateway access token (for Mission Control login), and your Telegram bot token.

1. Anthropic API Key (recommended)

ZoarkBot uses Anthropic's Claude to power all AI agents. You need an API key from the Anthropic Console.

1

Create your API key

Go to console.anthropic.com/settings/keys and create a new key.

2

Add it to your environment file

~/.zoarkbot/.env
ANTHROPIC_API_KEY=sk-ant-...
3

Restart ZoarkBot

zoarkbot restart
Verify it's working

Run zoarkbot status and look for "Anthropic: configured" in the output.

2. Gateway Access Token

Every ZoarkBot installation has a unique gateway access token. This is how Mission Control (mc.zoarkai.org) authenticates with your bot.

The token is generated when you first run zoarkbot start. To retrieve it at any time:

zoarkbot token

Copy the output and paste it into Mission Control when prompted to connect your gateway.

Using Mission Control

Go to mc.zoarkai.org, click "Connect Gateway", and paste your token. That's it — you're in.

Your token is stored in ~/.zoarkbot/zoarkbot.json under gateway.auth.token. Treat it like a password — don't share it.

3. Telegram Bot Token

To connect Telegram, you need a bot token from Telegram's official bot creation tool.

See Getting Started — Step 1 for the full walkthrough on creating a Telegram bot and getting its token.

Once you have the token, add it to your config:

~/.zoarkbot/zoarkbot.json
{ channels: { telegram: { token: "1234567890:ABCdefGHIjklMNOpqrSTUvwxYZ", allowFrom: ["your_telegram_username"] } } }

Security tips

Keep your API key in ~/.zoarkbot/.env, not in the config file (which may be in a shared location)
Never commit ~/.zoarkbot/zoarkbot.json to a git repo if it contains raw tokens
Rotate your gateway token with zoarkbot restart if you think it was exposed
Your Anthropic API key grants billing access — create a key with a spend limit if sharing a machine