Use this method to stop a poll which was sent by the bot
Use this method to stop a poll which was sent by the bot. On success, the stopped Poll with the final results is returned.
Body
Required
-
Identifier of the original message with the poll
-
This object represents an inline keyboard that appears right next to the message it belongs to.
POST
/stopPoll
curl \
-X POST https://api.telegram.org/bot123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11/stopPoll \
-H "Content-Type: application/json" \
-d '{"chat_id":42,"message_id":42,"reply_markup":{"":[[{}]]}}'
Request example
{
"chat_id": 42,
"message_id": 42,
"reply_markup": {
"": [
[
{}
]
]
}
}
Request examples
{
"chat_id": 42,
"message_id": 42,
"reply_markup": {
"": [
[
{}
]
]
}
}
Response examples (default)
{
"ok": false,
"error_code": 42,
"description": "string",
"parameters": {
"migrate_to_chat_id": 42,
"retry_after": 42
}
}
Response examples (default)
{
"ok": false,
"error_code": 42,
"description": "string",
"parameters": {
"migrate_to_chat_id": 42,
"retry_after": 42
}
}
Response examples (200)
{
"ok": true,
"result": {
"id": "string",
"question": "string",
"options": [
{
"text": "string",
"voter_count": 42
}
],
"total_voter_count": 42,
"is_closed": true,
"is_anonymous": true,
"type": "string",
"allows_multiple_answers": true,
"correct_option_id": 42,
"explanation": "string",
"explanation_entities": [
{
"type": "mention",
"offset": 42,
"length": 42,
"url": "string",
"user": {
"id": 42,
"is_bot": true,
"first_name": "string",
"last_name": "string",
"username": "string",
"language_code": "string",
"can_join_groups": true,
"can_read_all_group_messages": true,
"supports_inline_queries": true
},
"language": "string"
}
],
"open_period": 42,
"close_date": 42
}
}
Response examples (200)
{
"ok": true,
"result": {
"id": "string",
"question": "string",
"options": [
{
"text": "string",
"voter_count": 42
}
],
"total_voter_count": 42,
"is_closed": true,
"is_anonymous": true,
"type": "string",
"allows_multiple_answers": true,
"correct_option_id": 42,
"explanation": "string",
"explanation_entities": [
{
"type": "mention",
"offset": 42,
"length": 42,
"url": "string",
"user": {
"id": 42,
"is_bot": true,
"first_name": "string",
"last_name": "string",
"username": "string",
"language_code": "string",
"can_join_groups": true,
"can_read_all_group_messages": true,
"supports_inline_queries": true
},
"language": "string"
}
],
"open_period": 42,
"close_date": 42
}
}