Home · Help · Connecting a VK Bot: in One Click or with a Community Key
Connecting a VK Bot: in One Click or with a Community Key
A VK bot connects in a couple of minutes. First you turn on messages and bot features in the community. Then in CHBT: with the “Connect via VK” button (sign in with VK, no keys) or with a community access key. In both cases CHBT sets up the Callback API itself: you don’t enter a server address, confirmation string or secret. Below: the steps, what CHBT does when connecting, and how to find an error by its symptom.
What you need
- Community administrator rights. Only an administrator can connect a community: VK lists only the communities you administer, and access keys are created in “Manage”, which is open only to administrators.
- A bot in CHBT. Any plan works, including Free: there is no separate charge for the VK channel. If the bot already runs Telegram or MAX, VK is added to it and the scenario stays shared.
Step 1. Messages and bot capabilities
- “Manage” → “Messages” → set the “Community messages” toggle to “Enabled”. While it’s off, the community has no “Message” button, and not a single message reaches CHBT.
- In the same section, open “Bot settings”: set “Bot features” to “Enabled” and check “Add “Start” button”.
Why the second step: CHBT sends the buttons under replies as a bot keyboard, and VK accepts it only from communities with bot features enabled — without them, text replies go through, but messages with buttons don’t. The “Start” button also gives an entry point into the flow: CHBT treats a tap on it as the /start command.
Step 2. Connect with the “Connect via VK” button
- In your CHBT bot open “Channels” and on the “VK” card click “Connect via VK”.
- Sign in with VK ID using the page that administers the community.
- CHBT shows the communities you administer. Choose one and click “Connect”.
- VK asks for permission for the community — click “Allow”. Access to messages lets the bot reply, access to management lets CHBT set up event delivery itself, access to photos and files is for posts with images from the “Studio” section.
- CHBT sets up the Callback API and returns you to “Channels”: the community appears in a row with the “Works” status.
If instead of the list CHBT says “VK did not return your list of communities”, paste a link to the community, for example vk.com/club123 — VK will then ask for permission the same way. If it says “No communities where you are an administrator”, you signed in with the wrong page: ask the owner to make you an administrator or sign in with the owner’s page.
Step 2, alternative. Connect with a community key
Use this if the person connecting is not an administrator but a colleague who got a key from the administrator.
- In VK: community → “Manage” → “API usage” → “Access tokens” → “Create token”.
- Tick two permissions: “Community messages” — so the bot can reply, and “Community management” — so CHBT can set up event delivery itself. The bot doesn’t need the others.
- Copy the key — it starts with
vk1.a.. - In CHBT: “Channels” → “VK” card → “Connect using community key”, paste the key and click “Connect by key”.
CHBT checks the key and its permissions right away. If a permission is missing, the channel won’t connect, and the error names the permission to tick. The key is stored encrypted and is never shown again in the dashboard — neither to you nor to your team.
What CHBT does when connecting
- Identifies the community by the key and checks that the key has message and management permissions.
- Creates a “CHBT” Callback server in “Manage” → “API usage” → “Callback API”: an address like
https://app.chbt.io/webhook/vk/57, where the number is the channel number in CHBT, a confirmation string and a random secret. If a server with this address already exists, CHBT reconfigures it instead of creating a second one. - Enables API version 5.199 and events: incoming messages, button presses, allowing and denying messages from the community, and comments on posts and products — the “Studio” comment moderation uses them.
- Waits for VK to confirm. The channel gets the “Works” status only after VK has confirmed the server. If it hasn’t — the “Error” status with the reason.
After that CHBT checks every event against the secret, saves it to a queue and only then answers VK. A repeat of the same event doesn’t run the scenario a second time. CHBT “releases” a pressed button right away, before the scenario runs, so the person doesn’t see a spinning indicator. Replies are sent on behalf of the community: text and up to 10 buttons, two per row.
Checking after connecting
- Make sure the flow is enabled: in “Flows”, its card shows the “Enabled” badge, not “Draft”.
- From a personal page — yours or a colleague's, not from the community admin interface — open the community's messages. If this page hasn't messaged the community before, you'll see a “Start” button: tap it, then send any text.
- In CHBT, open “Conversations”. What you should see: the conversation is labeled with that page's first and last name, and it contains your messages and the bot's replies without a “not delivered” mark. Tap a branch button in the reply — the indicator on the button disappears immediately, and the next message follows.
If something went differently, find your symptom in the table below. The full step-by-step checklist, including the flow and the plan, is in “VK bot is silent”.
Connection errors and their symptoms
| What you see | Why | What to do |
|---|---|---|
| “Invalid community key or no “Management” permission” | The key was deleted, copied partially or issued by another community | Connect with the button or create a new key with both permissions |
| “The key lacks the “Community messages” permission” or “…“Community management”” | A permission wasn’t ticked when creating the key | Create the key again with both permissions and paste it via “Change key” in the channel row |
| “Couldn’t set up event delivery” or “VK did not confirm the callback” | VK didn’t allow creating or confirming the server — for example, the Callback API already has many old servers | Delete extra servers in “Manage” → “API usage” → “Callback API” and click “Reinstall webhook” in the channel row |
| The channel “Works”, “Conversations” is empty | “Community messages” are off, or you are writing from the administrator interface rather than a personal page | Step 1; test from a personal page |
| The message is in “Conversations”, the bot reply says “not delivered” | The person blocked messages from the community or the key was revoked | Hover over the mark to read the error; key revoked — connect again |
| “Error” status with “bot token rejected (401 Unauthorized)” | The key was deleted or revoked in VK. CHBT sets this status on the first failed send and emails the owner | Connect again with the button or paste a new key via “Change key” |
| Text replies arrive, messages with buttons don’t | “Bot features” are off | Step 1 |
| No “Start” button | “Add the Start button” isn’t ticked, or the page has already written to the community | Step 1; test from a page that hasn’t written to the community yet |
The full checklist in order, including the scenario and plan — “VK bot is silent”.
Changing the key and reconnecting
New key. In the channel row in “Channels” click “Change key” and paste the new one. The channel, its number, address and conversations stay the same. If the new key doesn’t work, CHBT restores the old one and the channel keeps working.
“Reinstall webhook”. The button in the channel row sets up the Callback API again with the saved key: server, secret, version and events. Use it if someone in the community deleted or changed the “CHBT” server.
Deleting the channel. Conversations of a deleted channel stay in “Conversations” for reading, contacts and their tags too. The “CHBT” server remains in VK — you can delete it manually in “Callback API”.
FAQ
Do I need to set up the Callback API myself?
No. Both with the button and with a key, CHBT creates the server, confirmation string, secret, API version and the needed events in the community itself. All you have to do is turn on messages and bot features in “Manage” → “Messages”.
The channel says “Works”, but the bot is silent. Why?
“Works” means VK has confirmed the CHBT server. If the bot is silent, most often “Community messages” are off, the scenario is a draft, or you are writing from the administrator interface. Test with a message from a personal page and check “Conversations”.
Does the bot reply to comments?
No, the scenario bot works only in community messages. CHBT receives comments on posts and products for moderation in the “Studio” section.
Which to choose: the button or a key?
The button, if you are a community administrator: no need to create a key and tick permissions. A key — if a colleague without administrator rights connects, using a key the administrator gave them.
VK channelBot is silent: checklistBot for a community: a walkthroughLead capture