1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-07-03 00:58:12 +02:00
Files
OpenIntegrations/docs/en/md/Slack/File-managment/Get-file-data.md

85 lines
1.9 KiB
Markdown
Raw Normal View History

---
sidebar_position: 3
---
# Get file data
Gets information about the file
2024-07-10 13:58:29 +03:00
`Function GetFileData(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
2024-07-10 14:05:58 +03:00
<br/>
2024-07-10 13:58:29 +03:00
```bsl title="Code example"
2024-09-29 17:27:25 +03:00
Token = "xoxb-6965308400114-696804637...";
2024-10-05 13:56:38 +03:00
FileID = "F07QLU2LLTW";
2024-09-29 17:27:25 +03:00
Result = OPI_Slack.GetFileData(Token, FileID);
```
```sh title="CLI command example"
oint slack GetFileData --token %token% --fileid "F070VL6FQFM"
```
```json title="Result"
2024-08-14 09:06:31 +03:00
{
2024-10-06 16:55:08 +03:00
"ok": true,
"file": {
"id": "F07QC80L07Q",
"created": 1728140464,
"timestamp": 1728140464,
"name": "megadoc.docx",
"title": "NewFile",
"mimetype": "",
"filetype": "",
"pretty_type": "",
"user": "U06UG1CAYH2",
"user_team": "T06UD92BS3C",
"editable": false,
"size": 24069,
"mode": "hosted",
"is_external": false,
"external_type": "",
"is_public": false,
"public_url_shared": false,
"display_as_bot": false,
"username": "",
2024-10-06 16:55:08 +03:00
"url_private": "https://files.slack.com/files-pri/T06UD92BS3C-F07QC80L07Q/megadoc.docx",
"url_private_download": "https://files.slack.com/files-pri/T06UD92BS3C-F07QC80L07Q/download/megadoc.docx",
"media_display_type": "unknown",
2024-10-06 16:55:08 +03:00
"permalink": "https://openintegrationsgroup.slack.com/files/U06UG1CAYH2/F07QC80L07Q/megadoc.docx",
"permalink_public": "https://slack-files.com/T06UD92BS3C-F07QC80L07Q-c69a470141",
"favorites": [],
"is_starred": false,
"shares": {},
"channels": [],
"groups": [],
"ims": [],
"has_more_shares": false,
"has_rich_preview": false,
"file_access": "visible",
"comments_count": 0
2024-10-06 16:55:08 +03:00
},
"comments": [],
"response_metadata": {
"next_cursor": ""
2024-10-06 16:55:08 +03:00
}
}
```