﻿---
sidebar_position: 5
---

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

# Delete external file
 Deletes an external file from Slack



`Function DeleteExternalFile(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

<br/>




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

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

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


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