Create story
Creates a story from an image
Function CreateStory(Val Image, Val URL = "", Val Parameters = "") Export
Parameter | CLI option | Type | Required | Description |
---|---|---|---|---|
Image | --picture | String, BinaryData | ✔ | Story background |
URL | --url | String | ✖ | URL for button under the story |
Parameters | --auth | Structure Of String | ✖ | Authorization JSON or path to .json |
Returns: Map Of KeyAndValue - serialized JSON response from VK
tip
Parameters with Binary data type can also accept file paths on disk and URLs
1C:Enterprise/OneScript code example
Parameters = GetVKParameters();
URL = "https://github.com/Bayselonarrend/OpenIntegrations";
Image = "https://hut.openintegrations.dev/test_data/picture.jpg"; // URL, File path or Binary Data
TFN = GetTempFileName("png");
CopyFile(Image, TFN);
Image = New BinaryData(TFN);
Result = OPI_VK.CreateStory(Image, URL, Parameters);
- Bash
- CMD/Bat
oint vk CreateStory \
--picture ""/tmp/2yjfkgvr.au5.png"" \
--auth ""/tmp/y1vn04jz.zcs.json""
oint vk CreateStory ^
--picture ""/tmp/2yjfkgvr.au5.png"" ^
--auth ""/tmp/y1vn04jz.zcs.json""
Result
{
"response": {
"count": 1,
"items": [
{
"id": 456241080,
"owner_id": -218861756,
"access_key": "story",
"can_comment": 1,
"can_reply": 1,
"can_see": 1,
"can_like": true,
"can_share": 1,
"can_hide": 1,
"date": 1757971942,
"expires_at": 1758058342,
"link": {
"text": "Ещё",
"url": "https://github.com/Bayselonarrend/OpenIntegrations"
},
"photo": {
"album_id": -81,
"date": 1757971942,
"id": 457259174,
"owner_id": -218861756,
"sizes": [
{
"height": 453,
"type": "x",
"width": 604,
"url": "https://sun56-1.userapi.com/s/v1/ig2/uKuaWtCsvJTUv_TiQk2xul8pRJrk_C8GIVvOaaXwAtpys-NNOnGMaVT1YfC4fSzVBChKDG7x0yGKN2WevEeiOMuo.jpg?size=604x453&quality=95&type=story"
},
{
"height": 605,
"type": "y",
"width": 807,
"url": "https://sun56-1.userapi.com/s/v1/ig2/3OVx6kkdH4tLCwiFeYjqMEiB_Zf8jqKW8gflSXlE9-lNkrg3j_o53QmgA8rgAQ0DtAoP8Kl8OgZZNwn_ckZnZd_K.jpg?size=807x605&quality=95&type=story"
},
{
"height": 960,
"type": "z",
"width": 1280,
"url": "https://sun56-1.userapi.com/s/v1/ig2/hTO_8Faz_pZpXE8mMKjdwrSw9JsBD7WZaF3aCZpGDgZQZYL7fRUjRFZquFr0cGWQkLNNIKBD0euQ6fHsHX8OxKOL.jpg?size=1280x960&quality=95&type=story"
},
{
"height": 1920,
"type": "w",
"width": 2560,
"url": "https://sun56-1.userapi.com/s/v1/ig2/QkleDAS1z-Ce5G0UpBdrmVPbj_w0GIoYgFax8cLM0g_XEVWqXd1PKRAj1cMc8CVt5He11nYzUep78J9IuOXU2dg6.jpg?size=2560x1920&quality=95&type=story"
}
],
"text": "",
"user_id": 100,
"web_view_token": "5d81f8efdd68d04784",
"has_tags": false
},
"replies": {
"count": 0,
"new": 0
},
"track_code": "story_json/eyJvd25lcl9pZCI6LTIxODg2MTc1Niwic3RvcnlfaWQiOjQ1NjI0MTA4MCwidmlld2VyX2lkIjo2NTc4NDY3NTZ9",
"type": "photo",
"views": 0,
"likes_count": 0,
"reaction_set_id": "reactions",
"no_sound": false,
"can_ask": 0,
"can_ask_anonymous": 0,
"narratives_count": 0,
"can_use_in_narrative": true
}
]
}
}