VKontakte

The agent replies on behalf of a VK community/public page: it receives and sends text and media in the community's direct messages and replies to subscribers' comments under wall posts.

How to connect

Order matters: connect the community in Smokva first, and only then click "Confirm" in VK. Smokva answers VK's confirmation with the string you entered when connecting — until the community is connected, it has nothing to answer with.

  1. Turn on community messages: Management → Messages → "Community messages": "Enabled". Without this, clients can't message the community and the agent has nothing to receive.

  2. In VK, open your community → Management → Settings → Advanced → API usage. You need these tabs: "Access keys", "Callback API" (inside: "Server settings", "Event types", "Requests") and "Long Poll API" (not needed).

  3. "Access keys" tab → "Create key". Tick the rights:

    • "Community messages access" — required for direct messages;
    • "Stories access" — if the agent should publish stories;
    • "Wall" — needed for a wall post (the "Wall post" section below, once Smokva has turned it on). For replies to comments under posts it is recommended: Smokva does not check this right for replies, its effect is not confirmed.

    Copy the created key — this is the "community access key".

  4. In Smokva, on the "Integrations" tab, pick VK. Keep the form open until the end of these steps. Paste the access key from step 3. Next to the "Callback API secret key" field, click "Generate": VK does not create the secret key — the field is empty in VK, and you set the key. Smokva makes 32 characters of Latin letters (both cases) and digits and copies them to the clipboard. There are no special characters in the key: VK accepts only Latin letters and digits.

    The VK panel: the Callback API server address with a Copy button, the Community access key field is outlined, then the secret key, the confirmation string and the agent choiceThe VK community connection form

    FieldWhat to paste
    Community access key (group token)the key from step 3
    Callback API secret keyclick "Generate"
    Server confirmation stringfill in at step 7
  5. In VK, open the "Callback API" tab → "Event types" and enable the events you need — the list is in the "Which events to enable in VK" section below. The minimum for messages and comments: "Incoming message", "New comment" (under "Photos", "Videos", "Products") and "Adding" under "Wall posts", "Wall comments", "Discussions".

  6. Go back to "Server settings". Leave the suggested "API version" (at the time of writing — 5.199). In "Address" enter https://api.smokva.ai/webhooks/vk — the same address is shown at the top of the connect window in Smokva; the "Copy" button copies it. In "Secret key" paste the key from the clipboard (if it won't paste, click the eye on the Smokva field and copy the key manually) and click "Save". VK shows "The string the server must return" — a short code of Latin letters and digits (for example, a1b2c3d4). Copy it.

  7. Back in the Smokva form, paste the code into "Server confirmation string". Tick the checkbox about the native VK integration in amoCRM being disabled and click "Connect". Smokva checks the key by calling VK; if the key does not fit, the form shows the reason.

    If you connect the community from an agent's card, the form has a "Which agent replies" field: the agent of this card is selected by default, but you can assign any other one (turned-off agents are marked "(turned off)"). The same choice appears for "Replace key" and "Add account"; when you replace a key, the community's current agent is offered, so the channel does not move to another agent by itself. You can change the agent later in the "Accounts" table. The launch wizard has no such field: the community goes to the agent you are launching.

  8. In VK, in "Server settings", click "Confirm". VK should report that the server is confirmed.

If it did not work

What you seeCause and what to do
VK says "The server returned an invalid response"The community is not connected in Smokva yet or the channel is inactive (or the confirmation string in the form differs from the one in VK). Connect the community as in step 7 and click "Confirm" again
"Could not verify the VK token"The key was copied incompletely, was revoked or belongs to another community. Create a new key and connect again
"This VK community is already connected"This community is already connected in your account (an active channel with the same community). Open the existing entry; to replace the keys, reconnect it instead of adding it a second time
"This VK community is already connected — to another channel in your account or to another Smokva account"A community can be connected to only one Smokva account at a time. If it is already connected in another account of yours (for example a work or test one), disconnect it there on the "Integrations" tab and connect it here again. If you have no account with this community, write to support and give the community ID
The community is connected but messages do not arriveThe event types are not enabled, or "Confirm" was not clicked in VK (steps 5 and 8)
Messages arrive, but the conversation shows "Agent did not reply — no agent is attached to this channel" under themThe community is connected, but no agent is assigned to it (or the assigned agent was deleted). Click "Attach agent" under the notice — the agent card opens on the "Integrations" tab with the VK panel; click "Link to this agent" or choose the agent in the "Account agent" column of the "Accounts" table. If there are no active agents, the link leads to "My agents" — create or turn on an agent first. The button appears only under the latest such notice and only for people with access to agents
The conversation shows "Agent did not reply — this channel's agent is turned off"The community has an agent, but it is paused or still a draft. Click "Turn on agent" under the notice — the agent card opens; turn the agent on in the "⋯" menu in the card header. Until then there will be no replies
The "Accounts" table shows "VK messages seem to also arrive via amoCRM" under the communityThe amoCRM Callback server — the native VK integration in amoCRM — is still in the community (or was added back). Then one customer message arrives twice: directly and via amoCRM, and the customer may get two replies. In VK open Management → Settings → Advanced → API usage → Callback API and remove the amoCRM server — only the Smokva server should remain. The notice disappears by itself a day after the last such message, or right after you reconnect the community with the checkbox ticked. amoCRM does not say which community a message came from: if you deliberately run another VK community through amoCRM, the notice may show up here too — then you can ignore it

What the agent can do in VK

  • Replies in the community's direct messages
  • Receives and sends media
  • Answers based on the agent's knowledge base

Comments in the community

The agent receives subscribers' comments and replies with a public comment on behalf of the community — but only under wall posts. The "Comments" mode is in the account's "Request types" block (see the "Request types" page).

Where the comment isReceivingAgent reply
Under a wall postyesworks
Under a photo, a product, in a discussion, under a videoyes: the comment appears in the cabinet's conversationsno. VK lets a community key reply only under wall posts and rejects other replies. The agent does not handle such a comment (and no model usage is spent on it): above the conversation feed, before the customer's messages, there is an "Agent did not reply" warning with the reason and an "Open in VK →" link to the photo, video, product or discussion (in a deal card — above the deal feed). Reply there manually. A manual reply from Smokva is not possible either: on sending, the cabinet immediately says VK does not allow a reply here and keeps your text in the field — reply in VK itself

A video in a post. If a video is published as a wall post, VK sends a comment on it twice: as a comment on the post and as a comment on the video. The agent replies once — under the post; the "under the video" copy gets the "Agent did not reply" note. It is the same subscriber message: if the agent's reply shows under the video, there is no need to reply manually.

Good to know:

  • Links. VK forbids links in a community's public comments: an agent reply with a link will not be published ("not delivered"). Do not ask the agent to give links in comments.
  • Addressing the author. If "Address the author by name in the reply to a comment" is on in the "Request types" block, the agent's reply starts with the author's name linked to their page: the person gets a notification and sees the reply is meant for them. The setting is on for a newly connected community and off for already connected ones until you turn it on. If VK does not return the author's name, the reply is published without the mention.
  • Edits and deletions. The agent's reply to a comment it has already received does not change if the subscriber later edits or deletes the comment. Under wall posts, Smokva applies edits and deletions to the stored feed (the agent no longer sees a deleted comment); in discussions, to the stored text for the deletion card; elsewhere they are only recorded in the log.
  • The agent cannot message a person first. VK lets a community write only to someone who wrote to the community first or allowed messages. That is why VK has no "reply and message privately" switch. A manager can do it by hand — see "Message a person first in private messages" below.
  • Community feed for the agent. Smokva stores new posts on your wall and the comments under them, and the agent (the social media assistant, in a task or in a conversation under a post comment) can read the latest posts and comments. The text, time and attachment types are stored — only what appeared after the events were enabled; the agent does not see earlier posts and comments. VK does not report edits or deletions of posts, so a post's text in the feed may be out of date: the agent always notes that the feed was assembled "as of" the moment of reading and may be incomplete. The feed is collected regardless of the "Comments" mode; for the agent to read it, at least one mode must be on for the account ("Comments" is on by default). If you reconnect the account to a different community, the agent reads only the new community's feed: posts and comments of the previous one are not mixed in.

Which events to enable in VK

For Smokva to receive comments and posts, open Management → Settings → Advanced → API usage → Callback API → Event types in VK and enable:

  • incoming messages — for direct messages;
  • added comments (on posts, photos, videos, products) and new messages in discussions — for comments;
  • new wall posts and added, edited, deleted and restored comments on posts — for the feed;
  • edited, deleted and restored messages in discussions — so that the deletion card shows the current text.

The names in VK's list may differ — look for the meaning.

Comment edits and deletions are optional: they do not change the agent's reply, but without them the feed (comments under wall posts) may show outdated text and deleted comments.

If a reply was not published

Such a reply keeps a "not delivered" mark in the dialog, with the reason in plain words and what to do underneath (the same reason appears in "History", on the "Send" event marked as not delivered). If the reason is unknown (as with replies sent before this caption existed), only the mark remains.

ReasonWhat to do
The reply contains a linkReply manually; remove the "give links in comments" requirement from the agent's instruction
Comments on the post are closedNothing: there is nowhere to reply
The community key was revokedCreate a new key and reconnect the community; the channel is marked as errored in that case
The key lacks the required rightsThe channel does not break, the reply is just not published: create a key with the required rights and reconnect the community
VK limited the rate or treated the actions as spamWait; Smokva does not republish the reply on its own so that two identical comments cannot appear. Reply manually
It is unknown whether the reply arrived (the connection to VK broke after sending)First check the comments in the community: the reply may have been published. If it is not there, reply manually

Stories and moderation in the community

For VK, Smokva can publish community stories, close and reopen comments under a post and delete comments in discussions — but not on its own: through a proposal and your approval on the "Outbound" tab. The "Publishing" and "Moderation" rows in the "Request types" block are off by default; you switch them on in the dashboard (Plus plan and above).

WhatHow it works
StoryOne file — a photo or a video, without text (VK stories have no caption — put the text on the picture). Photo: JPG, PNG, GIF, WEBP, HEIC, up to 8192×8192 pixels, up to 50 MB. Video: MP4 (H.264/AAC), up to 250 MB — that is Smokva's upload limit, VK accepts up to 350 MB. The story goes out on behalf of the community
ProposalThe agent proposes a story from the company's ready materials; a card cannot be approved without opening the file preview. A story, like any post with a file, is always approved by a person
Wall postsAvailable after Smokva turns the feature on (off by default): text and photos from the community album — only as photo links, Smokva files cannot be uploaded. VK does not officially describe this path and may close it. Details are in the "Wall post" section below
Close and reopen commentsUnder a specific wall post. Smokva remembers that it closed comments, but does not see it if you changed that in VK itself
Deleting a commentOnly in community discussions, irreversible. VK does not let a community key delete comments under wall posts, photos, videos or products. VK has no "hide" at all
Who proposesThe agent in VK only proposes stories for now (and a wall post if that feature is on — the "Wall post" section). Closing comments is queued through the API, and you approve it with one button. You can delete a comment in a discussion right from the conversation: click the customer's message → "Delete in VK…" → check the author, time and text in the window → "Delete". The deletion is queued at once, "Outbound" keeps a record of who deleted it and when, and the conversation shows "Deletion queued", then "Deleted in VK". If the author has changed the comment in the meantime, Smokva asks you to open the window again. The item is shown to people with the "Manage tasks" permission when "Comment moderation" is on for the account. Only comments that arrived after the events were enabled can be deleted: Smokva has no text for earlier ones, and the card is not created. Moderation always waits for a person, even under the "Immediately" policy
RetriesIf the connection to VK broke while a story was being saved, it is unknown whether it went out: Smokva does not republish it on its own, so there are not two. Check the community and send the story again. Closing, reopening and deleting are safe to repeat

What VK does not say and what is checked on a live community: how many stories can be published per day, the maximum video length, whether the "Community management" right is needed to close comments.

Wall post

Works only after Smokva turns this feature on for your account: it is off by default. VK does not let a community key upload photos, so Smokva publishes to the wall text and photos that you uploaded to the community album yourself beforehand. VK does not officially describe this path and may close it without warning — then the feature will be turned off.

  1. In VK, upload the photos to the community album (as an administrator).
  2. Open a photo and copy its address from the browser bar: it looks like vk.com/photo-123_456. An address with ?z=photo-… or just photo-123_456 works too.
  3. In Smokva open "Conversations" → "Outbound" → "New post", choose the platform "Community name · wall post", enter the text and paste the addresses into the "Photo links from the album" field — one per line, up to 10.
  4. Send the post. A post with photos always waits for your approval in "Outbound" — even if the channel is set to publish immediately. Each photo on the card has an "Open in VK ↗" link: open it, look at the photo and click "Approve". A text-only post follows the channel's rule.
What mattersHow it works
Key rightThe "Wall" right is required. Without it the "wall post" row stays grey with a reason: create a new key with that box ticked and reconnect the community
Where photos come fromOnly from albums of this community. Smokva rejects a photo from another community. Smokva does not see the pictures and cannot check that a photo is in place: if it is not in the album, VK may publish the post without it — check the wall after publishing
Stories and wallFor one community you choose either a story or a wall post at a time; if you need both, send twice
Not availablePolls, video, uploading files from Smokva and photos made by the agent, editing and deleting an already published post, geotag. Smokva files are not accepted in a wall post: upload them to the album yourself and paste the links
AgentThe agent can propose a wall post only with the photo links that you gave it. If Smokva already knows the key lacks the "Wall" right (for stories, "Stories access"), the agent does not propose the post and tells you which key to create
RetriesIf the connection to VK broke while the post was being sent, it is unknown whether it went out: Smokva does not republish it on its own, so there are not two. Check the community wall first
If it failedThe "Outbound" card states the reason: no "Wall" right, VK does not let the community key post to the wall (then publish the post manually), or the photo is not from this community. If the cause is a right or the key, reconnect the community with a new key and press "Retry". If the cause is the post itself (photos, links in the text, content) or VK does not let the key post to the wall, there is no "Retry" button: a retry would be refused the same way — create the post again

Message a person first in private messages

A manager can start a dialog in the community's private messages from the client card or from a comment in the feed. The full steps are on the Message a client first page.

ConditionWhat it means
The community is connectedThe message goes out on behalf of the community, not from a personal page
The person has already written to the community or left a commentThis is the only way Smokva learns their VK profile. The nickname in the client card's "VK" field is not used for this
The person has allowed messages from the communityThey wrote to the community themselves or pressed "Allow messages". Smokva only finds out at the moment of sending

If the person has not allowed messages, VK refuses: the message stays in the dialog marked "not delivered", the window stays open and tells you what to do — ask the person to write to you or press "Allow messages". If the client has several VK profiles (duplicates), the button is grey: write from the feed of the right comment.

If amoCRM handles your VK private messages. Then the person's reply arrives in amoCRM, not in the Smokva dialog: the dialog shows only your outgoing message. The window reminds you of this when amoCRM is connected.

The agent does not move from a comment to a private message on its own: only a manager does this, by hand.

Community key rights

When you connect, Smokva asks VK once which rights the key has and remembers the answer. Direct messages need the "Community messages access" right. A key created without it will connect, but the agent will not be able to write in direct messages — create a new key with this right and reconnect the community.

The "Wall" right (if VK shows it in the key form) is needed for a wall post: when that feature is on, Smokva checks it and keeps the "wall post" row grey without it. For replies to comments under posts it is not mandatory, but it is better to tick it. Stories need the "Stories access" right, and VK may require "Community management" to close comments (the VK method docs do not say — it will become clear the first time you close). If the key lacks a right, the mode row in the "Request types" block stays grey with a reason: create a new key with the right and reconnect the community. If VK reports that the key is no longer valid, the dashboard will ask you to create a new one and reconnect the community.

Disconnecting

Disconnect on the "Integrations" tab — the community stays intact, only the agent integration is removed.

A community cannot be connected in several accounts at once: disconnecting it in one frees it for another. The keys are kept on disconnect, so you can return the community to the previous account with "Reconnect" as long as no one else has taken it.