Get file data
Gets information about the file
- Parameters
- Advanced call ?
Function GetFileData(Val Token, Val FileID) Export
| Parameter | CLI option | Type | Required | Description |
|---|---|---|---|---|
| Token | --token | String | ✔ | Bot token |
| FileID | --fileid | String | ✔ | File identifier |
Returns
Map Of KeyAndValue - serialized JSON response from Slack
| Parameter | Description |
|---|---|
| proxy | InternetProxy or a structure with fields Protocol, Host, Port, User, Password, UseOSAuthentication |
| timeout | Request execution timeout |
| adv_response | Formats the response as a complete HTTP structure with fields code, body, and headers |
| retries | Number of HTTP request send attempts on 5** status codes or internal client errors |
| dontwait | Creates a background job and returns its data (for 1C and OneScript only) |
1C:Enterprise/OneScript code example
Token = "xoxb-6965308400114-696804637...";
FileID = "F09Q1MWDPKN";
Result = OPI_Slack.GetFileData(Token, FileID);
- Bash
- CMD/Bat
oint slack GetFileData \
--token "***" \
--fileid "F0B6B541E20"
oint slack GetFileData ^
--token "***" ^
--fileid "F0B6B541E20"
Result
{
"ok": true,
"file": {
"id": "F0B6B541E20",
"created": 1779804403,
"timestamp": 1779804403,
"mimetype": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"filetype": "docx",
"pretty_type": "Word Document",
"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": "",
"name": "megadoc.docx",
"title": "NewFile",
"is_modified_by_ai": false,
"url_private": "https://files.slack.com/files-pri/T06UD92BS3C-F0B6B541E20/megadoc.docx",
"url_private_download": "https://files.slack.com/files-pri/T06UD92BS3C-F0B6B541E20/download/megadoc.docx",
"media_display_type": "unknown",
"converted_pdf": "https://files.slack.com/files-tmb/T06UD92BS3C-F0B6B541E20-4e75a6b576/megadoc_converted.pdf",
"thumb_pdf": "https://files.slack.com/files-tmb/T06UD92BS3C-F0B6B541E20-4e75a6b576/megadoc_thumb_pdf.png",
"thumb_pdf_w": 909,
"thumb_pdf_h": 1286,
"permalink": "https://openintegrationsgroup.slack.com/files/U06UG1CAYH2/F0B6B541E20/megadoc.docx",
"permalink_public": "https://slack-files.com/T06UD92BS3C-F0B6B541E20-7cf2e9e48a",
"is_starred": false,
"shares": {},
"channels": [],
"groups": [],
"ims": [],
"has_more_shares": false,
"has_rich_preview": false,
"file_access": "visible",
"comments_count": 0
},
"comments": [],
"response_metadata": {
"next_cursor": ""
}
}