﻿---
sidebar_position: 3
---

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

# Get information about file
 Gets information about a file by ID



`Function GetFileInformation(Val Token, Val FileID) Export`

  | Parameter | CLI option | Type | Required | Description |
  |-|-|-|-|-|
  | Token | --token | String | &#x2714; | Bot token |
  | FileID | --fileid | String, Number | &#x2714; | File ID |

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

<br/>

:::tip
Method at API documentation: [GET /files/getInfo](https://teams.vk.com/botapi/#/files/get_files_getInfo)
:::
<br/>


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

    Result = OPI_VKTeams.GetFileInformation(Token, FileID);
```
 

 <Tabs>
  
    <TabItem value="bash" label="Bash" default>
        ```bash
            oint vkteams GetFileInformation \
             --token "***" \
             --fileid "oI7VKdOKEHbJoaYskr0WHS6739e2b41bd"
        ```
    </TabItem>
  
    <TabItem value="bat" label="CMD/Bat" default>
        ```batch
            oint vkteams GetFileInformation ^
             --token "***" ^
             --fileid "oI7VKdOKEHbJoaYskr0WHS6739e2b41bd"
        ```
    </TabItem>
</Tabs>


```json title="Result"
{
 "filename": "ImportantDocument.docx",
 "size": 24071,
 "type": "application",
 "url": "https://ub.icq.net/files/get/UevBEtxoDvTP9STM9cQIqD3cQIsU2jgGpNtxbSBlFdSiwSsu7INUFnIi7yRznGcZOvYiRHvmcGjlSRRIBSLheI78aN9IU8MS2Gcl8eGiMBiIii9BTFH1d8iCYIsl8bhIP5PnwS47uAEIC9JZb18v40xImk9cQI/ImportantDocument.docx",
 "ok": true
}
```
