2024-06-07 11:53:24 +00:00
|
|
|
---
|
|
|
|
sidebar_position: 2
|
|
|
|
---
|
|
|
|
|
|
|
|
# Get external file
|
|
|
|
Gets information about the external file
|
|
|
|
|
|
|
|
|
2024-07-10 11:59:55 +03:00
|
|
|
|
2024-07-10 13:58:29 +03:00
|
|
|
`Function GetExternalFile(Val Token, Val FileID) Export`
|
2024-06-07 11:53:24 +00:00
|
|
|
|
2024-08-13 15:52:26 +03:00
|
|
|
| Parameter | CLI option | Type | Description |
|
|
|
|
|-|-|-|-|
|
|
|
|
| Token | --token | String | Bot token |
|
|
|
|
| FileID | --fileid | String | File identifier |
|
2024-06-07 11:53:24 +00:00
|
|
|
|
2024-08-13 15:52:26 +03:00
|
|
|
|
|
|
|
Returns: Map Of KeyAndValue - Serialized JSON response from Slack
|
2024-06-07 11:53:24 +00:00
|
|
|
|
2024-07-10 14:05:58 +03:00
|
|
|
<br/>
|
2024-07-10 11:59:55 +03:00
|
|
|
|
2024-07-10 13:58:29 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
2024-06-07 11:53:24 +00:00
|
|
|
```bsl title="Code example"
|
2024-09-29 17:27:25 +03:00
|
|
|
Token = "xoxb-6965308400114-696804637...";
|
2024-09-29 19:41:20 +03:00
|
|
|
FileID = "F07P4JEGC8P";
|
2024-09-29 17:27:25 +03:00
|
|
|
|
|
|
|
Result = OPI_Slack.GetExternalFile(Token, FileID);
|
2024-06-07 11:53:24 +00:00
|
|
|
```
|
2024-08-13 15:52:26 +03:00
|
|
|
|
2024-07-10 11:59:55 +03:00
|
|
|
|
2024-06-07 11:53:24 +00:00
|
|
|
|
|
|
|
```sh title="CLI command example"
|
2024-08-13 15:52:26 +03:00
|
|
|
|
|
|
|
oint slack GetExternalFile --token %token% --fileid "F070P52CU94"
|
2024-06-07 11:53:24 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
```json title="Result"
|
2024-08-14 09:06:31 +03:00
|
|
|
{
|
2024-08-13 15:52:26 +03:00
|
|
|
"ok": true,
|
|
|
|
"file": {
|
|
|
|
"id": "F070P52CU94",
|
|
|
|
"created": 1714146552,
|
|
|
|
"timestamp": 1714146552,
|
|
|
|
"name": "Novyj_fajl",
|
|
|
|
"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/F070P52CU94/novyj_fajl",
|
|
|
|
"comments_count": 0,
|
|
|
|
"is_starred": false,
|
|
|
|
"shares": {},
|
|
|
|
"channels": [],
|
|
|
|
"groups": [],
|
|
|
|
"ims": [],
|
|
|
|
"has_more_shares": false,
|
|
|
|
"external_id": "d2a110a2-08eb-4f20-989f-8943f0816420",
|
|
|
|
"external_url": "https://slack.com/api/files.remote.add",
|
|
|
|
"has_rich_preview": false,
|
|
|
|
"file_access": "visible"
|
|
|
|
}
|
|
|
|
}
|
2024-06-07 11:53:24 +00:00
|
|
|
```
|