Run one product through multiple accounts
For teams that need several platforms at once, several accounts on one platform, or separate test and production accounts. The goal: write business code once, while each account connects on its own and can be diagnosed on its own.
Two terms first
- Adapter: the plugin that connects one platform, such as
icqqorslack. - Endpoint: one account or connection the bot is signed in to on a platform. One adapter can have several Endpoints.
Commands, components, and middleware belong to your plugin and are shared by every Endpoint. They aren't copied per account and don't call private platform SDKs.
Steps
- Check commands and replies in Sandbox.
- Run
npx zhin setup --adaptersand install an adapter for each platform. - Add one entry per account under the adapter's
endpoints; keep account secrets in environment variables. - After startup, send a test message from each Endpoint in Console's Conversations & Channels.
- Check which operations (
operations) each Endpoint supports in Runtime Capabilities. Connection modes of the same adapter can differ, so don't assume they match. - When something fails, filter Logs by level and Endpoint, and check Host and push health on the Dashboard.
For a config example, see Multi-platform community bot.
Acceptance checklist
- Stopping any one Endpoint doesn't affect the other accounts.
- The same command gives the same business result in Sandbox and on real platforms.
- When a platform lacks recall, reactions, or similar operations, the UI hides or degrades them instead of calling a private SDK.
- The production HTTP Host uses a token; platform secrets never appear in the repository or the Console Demo.
Next steps
- Platform adapters: choose how to connect based on your deployment
- Console path: manage several accounts in the browser