---
sidebar_position: 10
description: Upload video to server and other functions to work with VK in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, VK]
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# 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`

  | Parameter | CLI option | Type | Required | Description |
  |-|-|-|-|-|
  | Video | --file | String, BinaryData | &#x2714; | Video file |
  | Name | --title | String | &#x2714; | Video name |
  | Description | --description | String | &#x2716; | Video description |
  | Album | --album | String | &#x2716; | Album ID, if necessary |
  | Parameters | --auth | Structure Of String | &#x2716; | Authorization 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
:::
<br/>


```bsl title="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);
```
 

 <Tabs>
  
    <TabItem value="bash" label="Bash" default>
        ```bash
            # 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'}"
        ```
    </TabItem>
  
    <TabItem value="bat" label="CMD/Bat" default>
        ```batch
            :: 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'}"
        ```
    </TabItem>
</Tabs>


```json title="Result"
{
 "video_hash": "7febff69b3c51c1702",
 "size": 1137878,
 "direct_link": "https://vkvd216.okcdn.ru/?expires=1765650390930&srcIp=93.125.42.204&pr=40&srcAg=UNKNOWN&ms=45.136.22.152&type=4&sig=eR9fSw4h7Hg&ct=27&urls=185.226.55.236&clientType=14&appId=512000384397&zs=72&id=9537988004571",
 "owner_id": -218861756,
 "video_id": 456240993
}
```
