1. Installation & Requirements
BridgeChat AI requires WordPress 6.4 or newer and PHP 8.1 or newer. Install the plugin ZIP via WP Admin → Plugins → Add New → Upload Plugin.
- Activate BridgeChat AI in WordPress Plugins.
- Open Settings → BridgeChat AI → General & Widget. Keep Admin Preview Only selected while configuring, set your Team / Brand Name, placement, accent color, and starter prompts.
- Open the AI Provider tab, choose OpenAI or Google Gemini, paste your API key, and save.
- Open Knowledge Base (RAG), choose indexed post types or add Custom Knowledge notes, and click Rebuild RAG Index Now.
2. Telegram Bot & Forum Supergroup Setup
Create a dedicated Telegram bot with @BotFather using /newbot. Do not reuse an alert-only bot token because Telegram allows only one active webhook URL per bot token.
- Create a private Telegram Group and enable Topics in Group Settings.
- Add your bot as an Administrator with Manage Topics permission.
- Send one test message inside the group, then open Settings → BridgeChat AI → Telegram Forum Bridge, paste the Bot Token, and save.
- Click 1. Detect Group Chat ID (or paste your
-100...supergroup ID), click 2. Test Bot & Forum Group, and click 3. Register Telegram Webhook.
Inside any visitor topic, reply normally to message the visitor in real time, send /ai to return control to the AI assistant, or send /close to mark the conversation resolved and close the topic.
3. WP-CLI Commands
wp bridgechat-ai preview-docs
wp bridgechat-ai index
wp bridgechat-ai search "What services do you offer?"
wp bridgechat-ai test-telegram
wp bridgechat-ai register-webhook
4. Cache Safety, REST API & Uninstall Cleanup
Public mode never writes a WordPress REST nonce into cached page HTML. Instead, POST /wp-json/bridgechat-ai/v1/session issues an HMAC-SHA256 token bound to the visitor session UUID, and every response returns Cache-Control: no-store, no-cache, must-revalidate, max-age=0.
Incoming Telegram updates post to POST /wp-json/bridgechat-ai/v1/telegram-webhook and are verified with X-Telegram-Bot-Api-Secret-Token using hash_equals(). Database tables and options are preserved on deletion unless you enable Uninstall Cleanup under General & Widget settings.