Skip to content

How to Connect VKontakte to O-Key

This guide will show you how to connect VKontakte to O-Key so your AI agent can automatically respond to messages. Two methods are available: via a community (recommended) and via a personal account.

This is the official and stable connection method. You’ll need a VK community where you have admin rights.

  • A VKontakte account
  • A VK community (group) where you are an administrator
  • An O-Key account with a configured AI agent
  1. Find your community ID

    Open your VK group. The group ID is the number in the URL (e.g., vk.com/club123456789 — ID = 123456789).

  2. Enable community messages

    Go to “Manage” → “Messages” and enable message receiving.

  3. Create an access token

    In “Manage” → “API usage”, create a new access key with all required permissions.

  4. Get the confirmation code

    On the “Callback API” tab, copy the string from the “Confirmation code” field.

  5. Open channel settings in O-Key

    In O-Key CRM, go to “Agents” → “Settings” → “Channel connections”.

  6. Select VKontakte

    Click “VKontakte” and make sure “Community” mode is selected.

  7. Fill in the details

    Enter three fields: group ID, group token, and confirmation code.

  8. Save and copy the Callback URL

    After saving, O-Key will generate a Callback URL — copy it.

  9. Paste the URL in VK

    Go back to VK, to the “Callback API” tab, and paste the URL in the server address field.

  10. Confirm the connection

    Click “Confirm”. A green checkmark indicates a successful connection.

  11. Enable the “Incoming message” event

    On the “Event types” tab, check message_new (Incoming message).

  12. Test it

    Send a message to the community from another account — the AI agent should respond automatically.

  • Make sure the message_new event is enabled in VK event types
  • Check that the access token has not expired
  • Make sure the AI agent is not paused in O-Key
  • Compare the confirmation code in O-Key and VK — they must match exactly
  • Re-save settings in O-Key and retry confirmation
  • Generate a new token via vkhost.github.io
  • If VK sends warnings, switch to the community method
  • Send a new message after connecting — old chats may not sync
  • Check the channel filter — select “All channels”

If the issue persists, contact us at: support@o-key.ai