1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-04-13 11:50:53 +02:00

52 lines
1.3 KiB
Markdown
Raw Normal View History

---
sidebar_position: 5
---
# Get external link for a file
Get external link to file
`Function GetFileExternalLink(Val URL, Val FileID, Val Token = "") Export`
| Parameter | CLI option | Type | Description |
|-|-|-|-|
| URL | --url | String | URL of webhook or a Bitrix24 domain, when token used |
| FileID | --fileid | String, Number | File identifier |
| Token | --token | String | Access token, when app auth method used |
Returns: Map Of KeyAndValue - serialized JSON of answer from Bitrix24 API
<br/>
:::tip
The method has suddenly disappeared from the API on the cloud Bitrix24 where it was being tested (09/24). It might still work on other versions, but it's not guaranteed
Method at API documentation: [disk.file.getExternalLink](https://dev.1c-bitrix.ru/rest_help/disk/file/disk_file_getexternallink.php)
:::
<br/>
```bsl title="Code example"
2024-09-24 11:38:18 +03:00
URL = "https://b24-ar17wx.bitrix24.by/rest/1/1o2...";
2024-10-15 10:07:27 +03:00
FileID = "12876";
2024-08-13 16:47:32 +03:00
Result = OPI_Bitrix24.GetFileExternalLink(URL, FileID);
2024-09-24 11:38:18 +03:00
URL = "b24-ar17wx.bitrix24.by";
2024-10-15 10:07:27 +03:00
Token = "21750a67006e9f06006b12e400000001000...";
2024-08-13 16:47:32 +03:00
Result = OPI_Bitrix24.GetFileExternalLink(URL, FileID, Token);
```
2024-10-15 09:53:37 +03:00
```json title="Result"
2024-08-14 09:06:31 +03:00
{
2024-10-06 16:55:08 +03:00
"error": "ERROR_METHOD_NOT_FOUND",
"error_description": "Method not found!"
}
```