---
sidebar_position: 2
description: Get external file and other functions to work with Slack 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, Slack]
---

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

# Get external file
 Gets information about the external file



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

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

  
  Returns:  Map Of KeyAndValue - serialized JSON response from Slack



```bsl title="1C:Enterprise/OneScript code example"
    Token  = "xoxb-6965308400114-696804637...";
    FileID = "F0A2C43SASK";

    Result = OPI_Slack.GetExternalFile(Token, FileID);
```
 

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


```json title="Result"
{
 "ok": true,
 "file": {
  "id": "F0A2CG4MM8F",
  "created": 1765395627,
  "timestamp": 1765395627,
  "name": "NewFile",
  "title": "NewFile",
  "mimetype": "application/vnd.slack-remote",
  "filetype": "remote",
  "pretty_type": "Remote",
  "user": "U06UG1CAYH2",
  "user_team": "T06UD92BS3C",
  "editable": false,
  "size": 0,
  "mode": "external",
  "is_external": true,
  "external_type": "app",
  "is_public": false,
  "public_url_shared": false,
  "display_as_bot": false,
  "username": "",
  "external_id": "942c9f60-9075-41c7-8017-fb60da2cdd0b",
  "external_url": "https://hut.openintegrations.dev/test_data/document.docx",
  "url_private": "https://hut.openintegrations.dev/test_data/document.docx",
  "media_display_type": "unknown",
  "permalink": "https://openintegrationsgroup.slack.com/files/U06UG1CAYH2/F0A2CG4MM8F/newfile",
  "comments_count": 0,
  "is_starred": false,
  "shares": {},
  "channels": [],
  "groups": [],
  "ims": [],
  "has_more_shares": false,
  "app_id": "A06TYNH45RV",
  "has_rich_preview": false,
  "file_access": "visible"
 }
}
```
