Forward message
Forwards an existing message to the current dialog box
- Parameters
- Advanced call ?
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
| Parameter | Description |
|---|---|
| proxy | InternetProxy or a structure with fields Protocol, Host, Port, User, Password, UseOSAuthentication |
| timeout | Request execution timeout |
| adv_response | Formats the response as a complete HTTP structure with fields code, body, and headers |
| retries | Number of HTTP request send attempts on 5** status codes or internal client errors |
| dontwait | Creates a background job and returns its data (for 1C and OneScript only) |
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 = "7567354422724936211";
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 "7644204319796910329" \
--fromid "689203963@chat.agent" \
--chatid "***" \
--text "Additional text"
oint vkteams ForwardMessage ^
--token "***" ^
--messageid "7644204319796910329" ^
--fromid "689203963@chat.agent" ^
--chatid "***" ^
--text "Additional text"
Result
{
"msgId": "7644175272933081522",
"ok": true
}