Skip to main content

Upload video to server

Uploads video to the group for further use

Function UploadVideoToServer(Val Video, Val Name, Val Description = "", Val Album = "", Val Parameters = "") Export

ParameterCLI optionTypeRequiredDescription
Video--fileString, BinaryDataVideo file
Name--titleStringVideo name
Description--descriptionStringVideo description
Album--albumStringAlbum ID, if necessary
Parameters--authStructure Of StringAuthorization 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();

Video = "https://hut.openintegrations.dev/test_data/video.mp4"; // URL, Binary Data or File path
Name = "NewVideo";
Description = "Video description";

Result = OPI_VK.UploadVideoToServer(Video, Name, Description, , Parameters);
    oint vk UploadVideoToServer \
--file ""https://hut.openintegrations.dev/test_data/video.mp4"" \
--title ""NewVideo"" \
--description ""Video description"" \
--auth ""/tmp/fhytywzf.bdp.json""
Result
{
"video_hash": "6d40a8349a5b62a3a9",
"size": 1137878,
"direct_link": "https://vkvd274.okcdn.ru/?expires=1758231519615&srcIp=93.125.42.204&pr=40&srcAg=UNKNOWN&ms=185.226.52.152&type=4&sig=rdGhoHGBk2o&ct=27&urls=45.136.21.182&clientType=14&appId=512000384397&zs=72&id=8540370373187",
"owner_id": -218861756,
"video_id": 456240780
}