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 parameters. See GetAuthParameters
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);
# JSON data can also be passed as a path to a .json file

oint vk UploadVideoToServer \
--file "https://hut.openintegrations.dev/test_data/video.mp4" \
--title "NewVideo" \
--description "Video description" \
--auth "{'access_token':'***','owner_id':'-218861756','app_id':'51694790','group_id':'218861756'}"
Result
{
"video_hash": "994e3b2a475acde9b5",
"size": 1137878,
"direct_link": "https://vkvd759.okcdn.ru/?expires=1780061595813&srcIp=93.125.42.204&pr=40&srcAg=UNKNOWN&ms=95.163.35...",
"owner_id": -218861756,
"video_id": 456241352
}