VKontakte (VK) is a social network. The API covers messages, wall posts, comments, and search.
With VK in Pailot you can:
- Send messages to users and conversations with a community token
- Read conversation history
- Upload photos by URL to the wall
- Create posts with text and attachments
- Read a wall and search posts
- Write comments
- Search users and communities
The integration supports trigger mode through the VK Callback API: the workflow runs on a new community message or a new wall post.
How to connect
The integration uses an Access Token.
Community bot (recommended):
- Open VK → your community → Manage
- Open API → Access keys
- Create a key with
Messages,Wall,Photos - Paste the token into the block
Personal account: create a Standalone app at vk.com/editapp?act=create and obtain a user token via Implicit Flow.
Tools
vk_send_message
Send a message. Needs the messages scope.
| Parameter | Type | Required | Description |
|---|---|---|---|
accessToken | string | Yes | Token with messages |
peerId | string | Yes | User VK ID, or 2000000000 + conversation id |
message | string | Yes | Text |
attachment | string | No | VK attachments such as photo{owner}_{id}, comma-separated |
Output: messageId, message.
vk_get_messages
Conversation history. count defaults to 20, max 200. Output: count, items (id, date, from_id, peer_id, text), message.
vk_upload_photo
Upload a public image URL to the wall (VK’s three-step upload). Needs photos. Output: attachment (for example photo-123456_789012 for the post attachments field), ownerId, photoId, message.
vk_wall_post
Create a wall post. Negative ownerId is a community. fromGroup posts as the community. publishDate is a Unix time for a scheduled post. Output: postId, message.
vk_wall_get / vk_wall_search
List or search posts. Wall filter: all, owner, others, recent, postponed. Output: count, items, message.
vk_wall_comment
Comment on a post. Output: commentId, message.
vk_search
Search users (users) or communities (groups). Output: count, items, message.
Trigger: vk_callback
Start the workflow on a community event via Callback API.
| Parameter | Description |
|---|---|
| Webhook URL | Generated for you. Paste it into VK |
| Confirmation Code | From community → API → Callback API → “Get code” |
| Secret Key | Optional. If set in VK, every request includes it |
A webhook is an inbound HTTP request from VK. Save the URL and confirmation code on the block first, then click Confirm in VK — the server answers with the code.
- Community → Manage → API → Callback API
- Add server, paste the block URL
- Copy the confirmation code into the block and save
- Click Confirm in VK
- On Event types enable incoming message, wall post, comment as needed
Trigger outputs: type (message_new, wall_post_new, and others), message.id / text / from_id / peer_id, object, groupId, eventId.
VK API limits
| Limit | Detail |
|---|---|
| Messaging | A community can write only to people who messaged the bot first or opted in |
| Rate | Up to 3 req/s for a user token, 20 req/s for a community token |
| Photos | Run vk_upload_photo, then put the attachment string on the post |
| API version | 5.199 |