Forward message
Forwards an existing message to the current dialog box
Function ForwardMessage(Val Token, Val MessageID, Val FromChatID, Val ChatID, Val Text = "") Export
Parameter | CLI option | Type | Required | Description |
---|---|---|---|---|
Token | --token | String | ✔ | Bot token |
MessageID | --messageid | String, Number | ✔ | Original message ID |
FromChatID | --fromid | String, Number | ✔ | Source chat ID |
ChatID | --chatid | String, Number | ✔ | Chat ID for message sending |
Text | --text | String | ✖ | Additional message text |
Returns: Map Of KeyAndValue - serialized JSON response from VK Teams
tip
Only the chatId from events can be passed to the FromChatID (the code from the chat link is not suitable))
Method at API documentation: GET /messages/sendText
1C:Enterprise/OneScript code example
Token = "001.3501506236.091...";
ChatID = "AoLI0egLWBSLR1Ngn2w";
FromChatID = "689203963@chat.agent";
MessageID = "7428324441567793059";
Result = OPI_VKTeams.ForwardMessage(Token, MessageID, FromChatID, ChatID);
Text = "Additional text";
Result = OPI_VKTeams.ForwardMessage(Token, MessageID, FromChatID, ChatID, Text);
- Bash
- CMD/Bat
oint vkteams ForwardMessage \
--token "***" \
--messageid "7431934219846160783" \
--fromid "689203963@chat.agent" \
--chatid "AoLI0egLWBSLR1Ngn2w" \
--text "Additional text"
oint vkteams ForwardMessage ^
--token "***" ^
--messageid "7431934219846160783" ^
--fromid "689203963@chat.agent" ^
--chatid "AoLI0egLWBSLR1Ngn2w" ^
--text "Additional text"
Result
{
"msgId": "7423657667542911288",
"ok": true
}