copyMessage
Copy a message from one chat to another.
Request
POST /:token/copymessage
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| chat_id | Integer/String | Yes | Unique identifier for the target chat or username |
| from_chat_id | Integer/String | Yes | Unique identifier for the source chat or username |
| message_id | Integer | Yes | Identifier of the message to copy |
| caption | String | No | New caption replacing the original text/caption of the message. Treated as plain text; format entities of the original message are removed |
| parse_mode | String | No | Has no effect in the current version: the caption is not parsed for formatting (see Formatting Options for the styles) |
| caption_entities | MessageEntity[] | No | Has no effect in the current version |
| reply_markup | Object | No | Custom reply markup |
Response
Returns a MessageId object array on success.
json
{
"ok": true,
"result": [
{
"message_id": 12345
}
]
}Error Codes
| Code | Description |
|---|---|
| 400 | Bad request parameters |
| 401 | Invalid token |
| 403 | Bot does not have permission to perform this action |
| 404 | Source message does not exist |
