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 for the message |
| parse_mode | String | No | Parse mode for the caption (e.g. Markdown, HTML) |
| 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 |
