name: vk-community-video-publish description: Use when publishing a local video file to a VK community wall or VK community stories, especially with env tokens such as VK_ACCESS_TOKEN4 and targets like vk.com/club231828790. Covers token checks, video.save + wall.post, and the required stories.getVideoUploadServer + stories.save sequence. metadata: short-description: Publish VK community videos and stories
VK Community Video Publish
Use this skill for one-off VK community video publishing from local files in this repo.
Guardrails
- Never print access tokens. Source
.envlocally withset -a; source .env; set +a. - Prefer
artifacts/for uploaded source media; it is ignored by git. - Use a user token from a community admin/editor for video uploads. Group tokens can read groups but fail
video.savewithcode=27. - Runtime uses
VK_USER_TOKENor local fallbackVK_ACCESS_TOKEN4; CherryFlash Kaggle story publishing usesVK_ACCESS_TOKEN5inside encrypted story secrets. - If VK returns
code=5withaccess_token was given to another ip address, stop and ask for a fresh non-IP-bound user token. - Check
git status --shortbefore edits; do not touch unrelated dirty files.
Wall Video Post
- Verify token:
users.getshould succeed.groups.getById(group_ids=<group_id>)should identify the target group.
- Call
video.savewith:group_id=<positive group id>name=<short title>description=<caption>wallpost=0
- Upload the file to returned
upload_urlwith multipart fieldvideo_file. - Publish with
wall.post:owner_id=-<group_id>from_group=1signed=0message=<caption>attachments=video<owner_id>_<video_id>[_<access_key>]
- Report the final URL:
https://vk.com/wall-<group_id>_<post_id>.
Community Story
VK story publishing is two-step. Upload success alone is not enough.
- Call
stories.getVideoUploadServerwith:group_id=<positive group id>add_to_news=1
- Upload the video to returned
upload_urlwith multipart fieldfile. - Extract
response.upload_resultfrom the upload response. - Call
stories.savewith:upload_results=<upload_result>- optionally
extended=1for evidence.
- Treat success as
response.count >= 1; reportowner_id, storyid, andexpires_atif returned.
Known Good Case
- Target:
https://vk.com/club231828790 - Env:
VK_ACCESS_TOKEN4 - Wall post evidence:
https://vk.com/wall-231828790_876 - Story evidence:
owner_id=-231828790,id=456239019, saved only afterstories.save. - Additional verified story target:
https://vk.com/konb39(club30777579) published withowner_id=-30777579, storyid=456239753. - Verified image wall post target:
https://vk.com/klgdevents(club231920894) withphoto...attachment support.