City

Channel Accounts

How City manages bot credentials for messaging platforms

Channel Accounts

Messaging platform bot credentials (Telegram, Feishu, QQ) are stored and managed by City, not in individual Agent projects. This keeps secrets centralized and makes it easy to reuse the same bot across multiple projects.

How it works

  1. User adds a bot credential via Console or CLI (downcity chat add)
  2. City stores the credential securely in ~/.downcity/downcity.db
  3. The credential gets a channelAccountId
  4. Projects reference the credential by ID in downcity.json

Supported platforms

  • Telegram
  • Feishu (Lark)
  • QQ

Security

  • Credentials are encrypted at rest
  • Projects never see the raw token
  • Revocation is instant across all projects using the account

Configuration

{
  "plugins": {
    "chat": {
      "channels": {
        "telegram": {
          "enabled": true,
          "channelAccountId": "telegram-main"
        }
      }
    }
  }
}

Continue with: