SDKs and examples
Official SDKs
Server-side SDKs are available for PHP, JavaScript/TypeScript, and Python. All clients use the Runtime API at https://chat.wokey.pro/_keychat and verify webhook signatures against the original raw body. Follow the link below for the complete platform documentation.
PHP 8.1+
The keychat/bots package is published on Packagist. Run the install command inside a project with composer.json; run composer init first for a new project.
composer init --name=your-name/your-bot --no-interaction
composer require keychat/botsJavaScript / TypeScript — Node.js 18+
Until the npm package is published, install the SDK directly from GitHub. This is a server-side library; never expose a bot token in browser code.
npm install github:mikhailrepka/keychat-bots-jsPython 3.10+
Until the PyPI package is published, install the SDK directly from GitHub.
python -m pip install git+https://github.com/mikhailrepka/keychat-bots-python.git@echo_bot
The system conformance bot echoes incoming messages to validate installation, event delivery, and rendering. It does not replace signature and retry tests.
Minimum production checklist
- Secrets stay out of clients and logs.
- Signatures use the raw body.
- Events are deduplicated.
- Work runs in a queue.
- Sends use idempotency_key.
- 429 and 5xx retry with backoff.
SDK practice
SDKs handle authentication, serialization, media upload, and webhook verification. Business state, queues, deduplication, and retry policy remain application responsibilities.
Pin a compatible dependency range and update it separately after integration tests pass.
Usage examples
import { KeyChatBot } from '@keychat/bots';
const bot = new KeyChatBot(process.env.KEYCHAT_BOT_TOKEN!);