1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-04-07 07:10:01 +02:00
Vitaly the Alpaca (bot) b4a9919e77 Main build (Jenkins)
2024-10-13 16:53:00 +03:00

1.7 KiB

sidebar_position
2

Get external file

Gets information about the external file

Function GetExternalFile(Val Token, Val FileID) Export

Parameter CLI option Type Description
Token --token String Bot token
FileID --fileid String File identifier

Returns: Map Of KeyAndValue - serialized JSON response from Slack


    Token  = "xoxb-6965308400114-696804637...";
    FileID = "F07RN8F33GS";

    Result = OPI_Slack.GetExternalFile(Token, FileID);
    
  oint slack GetExternalFile --token %token% --fileid "F070P52CU94"

{
 "ok": true,
 "file": {
  "id": "F07QYP172FP",
  "created": 1728454531,
  "timestamp": 1728454531,
  "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": "",
  "url_private": "https://slack.com/api/files.remote.add",
  "media_display_type": "unknown",
  "permalink": "https://openintegrationsgroup.slack.com/files/U06UG1CAYH2/F07QYP172FP/newfile",
  "comments_count": 0,
  "is_starred": false,
  "shares": {},
  "channels": [],
  "groups": [],
  "ims": [],
  "has_more_shares": false,
  "external_id": "3a61913c-c2ce-412b-a4b4-6875373db31a",
  "external_url": "https://slack.com/api/files.remote.add",
  "has_rich_preview": false,
  "file_access": "visible"
 }
}