1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2024-11-28 09:08:38 +02:00
OpenIntegrations/docs/en/examples/VKTeams/SendFile.txt

17 lines
545 B
Plaintext
Raw Normal View History

2024-09-17 14:55:34 +02:00
 Token = "001.3501506236.091...";
ChatID = "AoLI0egLWBSLR1Ngn2w";
Text = "File caption";
2024-09-17 14:55:34 +02:00
File = "https://openintegrations.dev/test_data/document.docx"; // URL
FilePath = GetTempFileName("docx"); // Path
CopyFile(File, FilePath);
FileBD = New BinaryData(FilePath); // Binary
Result = OPI_VKTeams.SendFile(Token, ChatID, File);
Result = OPI_VKTeams.SendFile(Token, ChatID, FilePath, Text);
Result = OPI_VKTeams.SendFile(Token, ChatID, FileBD, Text, "ImportantDocument.docx");