---
sidebar_position: 2
description: Change chat picture and other functions to work with VKTeams 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, VKTeams]
---

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

# Change chat picture
 Changes the chat avatar picture



`Function ChangeChatPicture(Val Token, Val ChatID, Val File) Export`

  | Parameter | CLI option | Type | Required | Description |
  |-|-|-|-|-|
  | Token | --token | String | &#x2714; | Bot token |
  | ChatID | --chatid | String, Number | &#x2714; | Chat ID |
  | File | --file | BinaryData, String | &#x2714; | Image file |

  
  Returns:  Map Of KeyAndValue - serialized JSON response from VK Teams

:::tip
Method at API documentation: [POST ​/chats​/avatar​/set](https://teams.vk.com/botapi/#/chats/post_chats_avatar_set)

Parameters with Binary data type can also accept file paths on disk and URLs
:::
<br/>


```bsl title="1C:Enterprise/OneScript code example"
    Token  = "001.3501506236.091...";
    ChatID = "AoLI0egLWBSLR1Ngn2w";

    File     = "https://hut.openintegrations.dev/test_data/spy2.png"; // URL
    FilePath = GetTempFileName("png"); // Path

    CopyFile(File, FilePath);

    FileBD = New BinaryData(FilePath); // Binary

    Result = OPI_VKTeams.ChangeChatPicture(Token, ChatID, File);

    Process(Result, "VKTeams", "ChangeChatPicture", "URL");

    Result = OPI_VKTeams.ChangeChatPicture(Token, ChatID, FilePath);

    Process(Result, "VKTeams", "ChangeChatPicture", "Path");

    Result = OPI_VKTeams.ChangeChatPicture(Token, ChatID, FileBD);
```
 

 <Tabs>
  
    <TabItem value="bash" label="Bash" default>
        ```bash
            oint vkteams ChangeChatPicture \
             --token "***" \
             --chatid "***" \
             --file "/tmp/otb11li0.dld"
        ```
    </TabItem>
  
    <TabItem value="bat" label="CMD/Bat" default>
        ```batch
            oint vkteams ChangeChatPicture ^
             --token "***" ^
             --chatid "***" ^
             --file "/tmp/otb11li0.dld"
        ```
    </TabItem>
</Tabs>


```json title="Result"
{
 "ok": true
}
```
