1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-01-30 05:59:32 +02:00

25 lines
1.1 KiB
Plaintext
Raw Normal View History

2024-09-21 10:57:02 +03:00
 URL = "https://b24-ar17wx.bitrix24.by/rest/1/1o2...";
2024-09-24 14:14:07 +03:00
ChatID = "825";
File = "https://github.com/Bayselonarrend/OpenIntegrations/raw/main/service/test_data/document.docx"; // Binary Data, URL or path to file
Description = "Very important file";
Directory = OPI_Bitrix24.GetChatFilesFolder(URL, ChatID);
FolderID = Directory["result"]["ID"];
UploadedFile = OPI_Bitrix24.UploadFileToFolder(URL, "Imortant doc.docx", File, FolderID);
FileID = UploadedFile["result"]["ID"];
Result = OPI_Bitrix24.SendFile(URL, ChatID, FileID, Description);
2024-09-21 10:57:02 +03:00
URL = "b24-ar17wx.bitrix24.by";
2024-09-24 14:14:07 +03:00
Token = "4f33ef66006e9f06006b12e400000001000...";
ChatID = "827";
Directory = OPI_Bitrix24.GetChatFilesFolder(URL, ChatID, Token);
FolderID = Directory["result"]["ID"];
UploadedFile = OPI_Bitrix24.UploadFileToFolder(URL, "Imortant doc.docx", File, FolderID, Token);
FileID = UploadedFile["result"]["ID"];
Result = OPI_Bitrix24.SendFile(URL, ChatID, FileID, Description, Token);