1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-03-27 21:48:56 +02:00

82 lines
1.9 KiB
Markdown
Raw Normal View History

---
sidebar_position: 5
---
# Make file public
Creates a public URL for the file. Requires user token
2024-07-10 13:58:29 +03:00
`Function MakeFilePublic(Val Token, Val FileID) Export`
| Parameter | CLI option | Type | Description |
|-|-|-|-|
| Token | --token | String | User token |
| FileID | --fileid | String | File identifier |
2024-10-09 09:42:00 +03:00
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-10-05 11:21:35 +03:00
Token = "xoxb-6965308400114-696804637...";
2024-10-13 16:53:00 +03:00
FileID = "F07RFKJR7GW";
2024-10-05 11:21:35 +03:00
Result = OPI_Slack.MakeFilePublic(Token, FileID);
```
```sh title="CLI command example"
oint slack MakeFilePublic --token %token% --fileid %fileid%
```
```json title="Result"
2024-10-06 16:55:08 +03:00
{
"ok": true,
"files": [
{
2024-10-09 09:42:00 +03:00
"id": "F07QV0PCS1L",
"created": 1728454525,
"timestamp": 1728454525,
2024-10-06 16:55:08 +03:00
"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-09 09:42:00 +03:00
"url_private": "https://files.slack.com/files-pri/T06UD92BS3C-F07QV0PCS1L/megadoc.docx",
"url_private_download": "https://files.slack.com/files-pri/T06UD92BS3C-F07QV0PCS1L/download/megadoc.docx",
2024-10-06 16:55:08 +03:00
"media_display_type": "unknown",
2024-10-09 09:42:00 +03:00
"permalink": "https://openintegrationsgroup.slack.com/files/U06UG1CAYH2/F07QV0PCS1L/megadoc.docx",
"permalink_public": "https://slack-files.com/T06UD92BS3C-F07QV0PCS1L-dec85076a5",
2024-10-06 16:55:08 +03:00
"comments_count": 0,
"is_starred": false,
"shares": {},
"channels": [],
"groups": [],
"ims": [],
"has_more_shares": false,
"has_rich_preview": false,
"file_access": "visible"
}
]
}
```