This commit is contained in:
sys-001 2024-08-25 16:58:34 +00:00
parent 1f354c6238
commit d4e72fc4d9
5 changed files with 1066 additions and 111 deletions

View File

@ -1,5 +1,5 @@
{
"version": "7.7.0",
"version": "7.9.0",
"types": [
{
"name": "Update",
@ -372,6 +372,14 @@
],
"optional": true,
"description": "Optional. True, if the bot can be connected to a Telegram Business account to receive its messages. Returned only in getMe."
},
{
"name": "has_main_web_app",
"types": [
"bool"
],
"optional": true,
"description": "Optional. True, if the bot has a main Web App. Returned only in getMe."
}
],
"extended_by": []
@ -836,7 +844,7 @@
"User"
],
"optional": true,
"description": "Optional. Sender of the message; empty for messages sent to channels. For backward compatibility, the field contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat."
"description": "Optional. Sender of the message; may be empty for messages sent to channels. For backward compatibility, if the message was sent on behalf of a chat, the field contains a fake sender user in non-channel chats"
},
{
"name": "sender_chat",
@ -844,7 +852,7 @@
"Chat"
],
"optional": true,
"description": "Optional. Sender of the message, sent on behalf of a chat. For example, the channel itself for channel posts, the supergroup itself for messages from anonymous group administrators, the linked channel for messages automatically forwarded to the discussion group. For backward compatibility, the field from contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat."
"description": "Optional. Sender of the message when sent on behalf of a chat. For example, the supergroup itself for messages sent by its anonymous administrators or a linked channel for messages automatically forwarded to the channel's discussion group. For backward compatibility, if the message was sent on behalf of a chat, the field from contains a fake sender user in non-channel chats."
},
{
"name": "sender_boost_count",
@ -4767,6 +4775,22 @@
],
"optional": true,
"description": "Optional. Number of pending join requests created using this link"
},
{
"name": "subscription_period",
"types": [
"int"
],
"optional": true,
"description": "Optional. The number of seconds the subscription will be active for before the next payment"
},
{
"name": "subscription_price",
"types": [
"int"
],
"optional": true,
"description": "Optional. The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat using the link"
}
],
"extended_by": []
@ -5199,6 +5223,14 @@
],
"optional": false,
"description": "Information about the user"
},
{
"name": "until_date",
"types": [
"int"
],
"optional": true,
"description": "Optional. Date when the user's subscription will expire; Unix time"
}
],
"extended_by": []
@ -5742,7 +5774,8 @@
"fields": [],
"extended_by": [
"ReactionTypeEmoji",
"ReactionTypeCustomEmoji"
"ReactionTypeCustomEmoji",
"ReactionTypePaid"
]
},
{
@ -5791,6 +5824,21 @@
],
"extended_by": []
},
{
"name": "ReactionTypePaid",
"description": "The reaction is paid.",
"fields": [
{
"name": "type",
"types": [
"string"
],
"optional": false,
"description": "Type of the reaction, always “paid”"
}
],
"extended_by": []
},
{
"name": "ReactionCount",
"description": "Represents a reaction added to a message along with the number of times it was added.",
@ -10398,6 +10446,14 @@
],
"optional": true,
"description": "Optional. Bot-specified invoice payload"
},
{
"name": "paid_media",
"types": [
"Array<PaidMedia>"
],
"optional": true,
"description": "Optional. Information about the paid media bought by the user"
}
],
"extended_by": []
@ -12690,8 +12746,16 @@
},
{
"name": "sendPaidMedia",
"description": "Use this method to send paid media to channel chats. On success, the sent Message is returned.",
"description": "Use this method to send paid media. On success, the sent Message is returned.",
"fields": [
{
"name": "business_connection_id",
"types": [
"string"
],
"optional": true,
"description": "Unique identifier of the business connection on behalf of which the message will be sent"
},
{
"name": "chat_id",
"types": [
@ -12699,7 +12763,7 @@
"string"
],
"optional": false,
"description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)"
"description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername). If the chat is a channel, all Telegram Star proceeds from this media will be credited to the chat's balance. Otherwise, they will be credited to the bot's balance."
},
{
"name": "star_count",
@ -13560,7 +13624,7 @@
},
{
"name": "setMessageReaction",
"description": "Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Returns True on success.",
"description": "Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can't use paid reactions. Returns True on success.",
"fields": [
{
"name": "chat_id",
@ -13585,7 +13649,7 @@
"Array<ReactionType>"
],
"optional": true,
"description": "A JSON-serialized list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators."
"description": "A JSON-serialized list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators. Paid reactions can't be used by bots."
},
{
"name": "is_big",
@ -14169,6 +14233,82 @@
"ChatInviteLink"
]
},
{
"name": "createChatSubscriptionInviteLink",
"description": "Use this method to create a subscription invite link for a channel chat. The bot must have the can_invite_users administrator rights. The link can be edited using the method editChatSubscriptionInviteLink or revoked using the method revokeChatInviteLink. Returns the new invite link as a ChatInviteLink object.",
"fields": [
{
"name": "chat_id",
"types": [
"int",
"string"
],
"optional": false,
"description": "Unique identifier for the target channel chat or username of the target channel (in the format @channelusername)"
},
{
"name": "name",
"types": [
"string"
],
"optional": true,
"description": "Invite link name; 0-32 characters"
},
{
"name": "subscription_period",
"types": [
"int"
],
"optional": false,
"description": "The number of seconds the subscription will be active for before the next payment. Currently, it must always be 2592000 (30 days)."
},
{
"name": "subscription_price",
"types": [
"int"
],
"optional": false,
"description": "The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat; 1-2500"
}
],
"return_types": [
"ChatInviteLink"
]
},
{
"name": "editChatSubscriptionInviteLink",
"description": "Use this method to edit a subscription invite link created by the bot. The bot must have the can_invite_users administrator rights. Returns the edited invite link as a ChatInviteLink object.",
"fields": [
{
"name": "chat_id",
"types": [
"int",
"string"
],
"optional": false,
"description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)"
},
{
"name": "invite_link",
"types": [
"string"
],
"optional": false,
"description": "The invite link to edit"
},
{
"name": "name",
"types": [
"string"
],
"optional": true,
"description": "Invite link name; 0-32 characters"
}
],
"return_types": [
"ChatInviteLink"
]
},
{
"name": "revokeChatInviteLink",
"description": "Use this method to revoke an invite link created by the bot. If the primary link is revoked, a new link is automatically generated. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the revoked invite link as ChatInviteLink object.",
@ -14347,6 +14487,14 @@
"name": "pinChatMessage",
"description": "Use this method to add a message to the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success.",
"fields": [
{
"name": "business_connection_id",
"types": [
"string"
],
"optional": true,
"description": "Unique identifier of the business connection on behalf of which the message will be pinned"
},
{
"name": "chat_id",
"types": [
@ -14381,6 +14529,14 @@
"name": "unpinChatMessage",
"description": "Use this method to remove a message from the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success.",
"fields": [
{
"name": "business_connection_id",
"types": [
"string"
],
"optional": true,
"description": "Unique identifier of the business connection on behalf of which the message will be unpinned"
},
{
"name": "chat_id",
"types": [
@ -14396,7 +14552,7 @@
"int"
],
"optional": true,
"description": "Identifier of a message to unpin. If not specified, the most recent pinned message (by sending date) will be unpinned."
"description": "Identifier of the message to unpin. Required if business_connection_id is specified. If not specified, the most recent pinned message (by sending date) will be unpinned."
}
],
"return_types": [
@ -14615,7 +14771,7 @@
},
{
"name": "editForumTopic",
"description": "Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.",
"description": "Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.",
"fields": [
{
"name": "chat_id",
@ -14761,7 +14917,7 @@
},
{
"name": "editGeneralForumTopic",
"description": "Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights. Returns True on success.",
"description": "Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns True on success.",
"fields": [
{
"name": "chat_id",

View File

@ -1,4 +1,4 @@
version: 7.7.0
version: 7.9.0
types:
-
name: Update
@ -280,6 +280,12 @@ types:
- bool
optional: true
description: 'Optional. True, if the bot can be connected to a Telegram Business account to receive its messages. Returned only in getMe.'
-
name: has_main_web_app
types:
- bool
optional: true
description: 'Optional. True, if the bot has a main Web App. Returned only in getMe.'
extended_by: { }
-
name: Chat
@ -630,13 +636,13 @@ types:
types:
- User
optional: true
description: 'Optional. Sender of the message; empty for messages sent to channels. For backward compatibility, the field contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat.'
description: 'Optional. Sender of the message; may be empty for messages sent to channels. For backward compatibility, if the message was sent on behalf of a chat, the field contains a fake sender user in non-channel chats'
-
name: sender_chat
types:
- Chat
optional: true
description: 'Optional. Sender of the message, sent on behalf of a chat. For example, the channel itself for channel posts, the supergroup itself for messages from anonymous group administrators, the linked channel for messages automatically forwarded to the discussion group. For backward compatibility, the field from contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat.'
description: "Optional. Sender of the message when sent on behalf of a chat. For example, the supergroup itself for messages sent by its anonymous administrators or a linked channel for messages automatically forwarded to the channel's discussion group. For backward compatibility, if the message was sent on behalf of a chat, the field from contains a fake sender user in non-channel chats."
-
name: sender_boost_count
types:
@ -3573,6 +3579,18 @@ types:
- int
optional: true
description: 'Optional. Number of pending join requests created using this link'
-
name: subscription_period
types:
- int
optional: true
description: 'Optional. The number of seconds the subscription will be active for before the next payment'
-
name: subscription_price
types:
- int
optional: true
description: 'Optional. The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat using the link'
extended_by: { }
-
name: ChatAdministratorRights
@ -3897,6 +3915,12 @@ types:
- User
optional: false
description: 'Information about the user'
-
name: until_date
types:
- int
optional: true
description: "Optional. Date when the user's subscription will expire; Unix time"
extended_by: { }
-
name: ChatMemberRestricted
@ -4302,6 +4326,7 @@ types:
extended_by:
- ReactionTypeEmoji
- ReactionTypeCustomEmoji
- ReactionTypePaid
-
name: ReactionTypeEmoji
description: 'The reaction is based on an emoji.'
@ -4336,6 +4361,17 @@ types:
optional: false
description: 'Custom emoji identifier'
extended_by: { }
-
name: ReactionTypePaid
description: 'The reaction is paid.'
fields:
-
name: type
types:
- string
optional: false
description: 'Type of the reaction, always “paid”'
extended_by: { }
-
name: ReactionCount
description: 'Represents a reaction added to a message along with the number of times it was added.'
@ -7797,6 +7833,12 @@ types:
- string
optional: true
description: 'Optional. Bot-specified invoice payload'
-
name: paid_media
types:
- Array<PaidMedia>
optional: true
description: 'Optional. Information about the paid media bought by the user'
extended_by: { }
-
name: TransactionPartnerFragment
@ -9517,15 +9559,21 @@ methods:
- Message
-
name: sendPaidMedia
description: 'Use this method to send paid media to channel chats. On success, the sent Message is returned.'
description: 'Use this method to send paid media. On success, the sent Message is returned.'
fields:
-
name: business_connection_id
types:
- string
optional: true
description: 'Unique identifier of the business connection on behalf of which the message will be sent'
-
name: chat_id
types:
- int
- string
optional: false
description: 'Unique identifier for the target chat or username of the target channel (in the format @channelusername)'
description: "Unique identifier for the target chat or username of the target channel (in the format @channelusername). If the chat is a channel, all Telegram Star proceeds from this media will be credited to the chat's balance. Otherwise, they will be credited to the bot's balance."
-
name: star_count
types:
@ -10171,7 +10219,7 @@ methods:
- bool
-
name: setMessageReaction
description: "Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Returns True on success."
description: "Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can't use paid reactions. Returns True on success."
fields:
-
name: chat_id
@ -10191,7 +10239,7 @@ methods:
types:
- Array<ReactionType>
optional: true
description: 'A JSON-serialized list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators.'
description: "A JSON-serialized list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators. Paid reactions can't be used by bots."
-
name: is_big
types:
@ -10620,6 +10668,62 @@ methods:
description: "True, if users joining the chat via the link need to be approved by chat administrators. If True, member_limit can't be specified"
return_types:
- ChatInviteLink
-
name: createChatSubscriptionInviteLink
description: 'Use this method to create a subscription invite link for a channel chat. The bot must have the can_invite_users administrator rights. The link can be edited using the method editChatSubscriptionInviteLink or revoked using the method revokeChatInviteLink. Returns the new invite link as a ChatInviteLink object.'
fields:
-
name: chat_id
types:
- int
- string
optional: false
description: 'Unique identifier for the target channel chat or username of the target channel (in the format @channelusername)'
-
name: name
types:
- string
optional: true
description: 'Invite link name; 0-32 characters'
-
name: subscription_period
types:
- int
optional: false
description: 'The number of seconds the subscription will be active for before the next payment. Currently, it must always be 2592000 (30 days).'
-
name: subscription_price
types:
- int
optional: false
description: 'The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat; 1-2500'
return_types:
- ChatInviteLink
-
name: editChatSubscriptionInviteLink
description: 'Use this method to edit a subscription invite link created by the bot. The bot must have the can_invite_users administrator rights. Returns the edited invite link as a ChatInviteLink object.'
fields:
-
name: chat_id
types:
- int
- string
optional: false
description: 'Unique identifier for the target chat or username of the target channel (in the format @channelusername)'
-
name: invite_link
types:
- string
optional: false
description: 'The invite link to edit'
-
name: name
types:
- string
optional: true
description: 'Invite link name; 0-32 characters'
return_types:
- ChatInviteLink
-
name: revokeChatInviteLink
description: 'Use this method to revoke an invite link created by the bot. If the primary link is revoked, a new link is automatically generated. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the revoked invite link as ChatInviteLink object.'
@ -10751,6 +10855,12 @@ methods:
name: pinChatMessage
description: "Use this method to add a message to the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success."
fields:
-
name: business_connection_id
types:
- string
optional: true
description: 'Unique identifier of the business connection on behalf of which the message will be pinned'
-
name: chat_id
types:
@ -10776,6 +10886,12 @@ methods:
name: unpinChatMessage
description: "Use this method to remove a message from the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success."
fields:
-
name: business_connection_id
types:
- string
optional: true
description: 'Unique identifier of the business connection on behalf of which the message will be unpinned'
-
name: chat_id
types:
@ -10788,7 +10904,7 @@ methods:
types:
- int
optional: true
description: 'Identifier of a message to unpin. If not specified, the most recent pinned message (by sending date) will be unpinned.'
description: 'Identifier of the message to unpin. Required if business_connection_id is specified. If not specified, the most recent pinned message (by sending date) will be unpinned.'
return_types:
- bool
-
@ -10946,7 +11062,7 @@ methods:
- ForumTopic
-
name: editForumTopic
description: 'Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.'
description: 'Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.'
fields:
-
name: chat_id
@ -11053,7 +11169,7 @@ methods:
- bool
-
name: editGeneralForumTopic
description: "Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights. Returns True on success."
description: "Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns True on success."
fields:
-
name: chat_id

View File

@ -3,7 +3,7 @@
"info": {
"title": "Telegram Bot API",
"description": "Auto-generated OpenAPI schema by TGScraper.",
"version": "7.7.0"
"version": "7.9.0"
},
"servers": [
{
@ -325,6 +325,9 @@
},
"can_connect_to_business": {
"type": "boolean"
},
"has_main_web_app": {
"type": "boolean"
}
},
"type": "object"
@ -2718,6 +2721,12 @@
},
"pending_join_request_count": {
"type": "integer"
},
"subscription_period": {
"type": "integer"
},
"subscription_price": {
"type": "integer"
}
},
"type": "object"
@ -2960,6 +2969,9 @@
},
"user": {
"$ref": "#/components/schemas/User"
},
"until_date": {
"type": "integer"
}
},
"type": "object"
@ -3266,6 +3278,9 @@
},
{
"$ref": "#/components/schemas/ReactionTypeCustomEmoji"
},
{
"$ref": "#/components/schemas/ReactionTypePaid"
}
]
},
@ -3301,6 +3316,18 @@
},
"type": "object"
},
"ReactionTypePaid": {
"description": "The reaction is paid.",
"required": [
"type"
],
"properties": {
"type": {
"type": "string"
}
},
"type": "object"
},
"ReactionCount": {
"description": "Represents a reaction added to a message along with the number of times it was added.",
"required": [
@ -6029,6 +6056,12 @@
},
"invoice_payload": {
"type": "string"
},
"paid_media": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PaidMedia"
}
}
},
"type": "object"
@ -10699,7 +10732,7 @@
}
},
"/sendPaidMedia": {
"description": "Use this method to send paid media to channel chats. On success, the sent Message is returned.",
"description": "Use this method to send paid media. On success, the sent Message is returned.",
"post": {
"requestBody": {
"required": true,
@ -10707,12 +10740,10 @@
"application/json": {
"schema": {
"type": "object",
"required": [
"chat_id",
"star_count",
"media"
],
"properties": {
"business_connection_id": {
"type": "string"
},
"chat_id": {
"anyOf": [
{
@ -10772,18 +10803,21 @@
}
]
}
}
},
"required": [
"chat_id",
"star_count",
"media"
]
}
},
"application/x-www-form-urlencoded": {
"schema": {
"type": "object",
"required": [
"chat_id",
"star_count",
"media"
],
"properties": {
"business_connection_id": {
"type": "string"
},
"chat_id": {
"anyOf": [
{
@ -10843,18 +10877,21 @@
}
]
}
}
},
"required": [
"chat_id",
"star_count",
"media"
]
}
},
"multipart/form-data": {
"schema": {
"type": "object",
"required": [
"chat_id",
"star_count",
"media"
],
"properties": {
"business_connection_id": {
"type": "string"
},
"chat_id": {
"anyOf": [
{
@ -10914,7 +10951,12 @@
}
]
}
}
},
"required": [
"chat_id",
"star_count",
"media"
]
}
}
}
@ -12816,7 +12858,7 @@
}
},
"/setMessageReaction": {
"description": "Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Returns True on success.",
"description": "Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can't use paid reactions. Returns True on success.",
"post": {
"requestBody": {
"required": true,
@ -14878,6 +14920,296 @@
}
}
},
"/createChatSubscriptionInviteLink": {
"description": "Use this method to create a subscription invite link for a channel chat. The bot must have the can_invite_users administrator rights. The link can be edited using the method editChatSubscriptionInviteLink or revoked using the method revokeChatInviteLink. Returns the new invite link as a ChatInviteLink object.",
"post": {
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"chat_id",
"subscription_period",
"subscription_price"
],
"properties": {
"chat_id": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"name": {
"type": "string"
},
"subscription_period": {
"type": "integer"
},
"subscription_price": {
"type": "integer"
}
}
}
},
"application/x-www-form-urlencoded": {
"schema": {
"type": "object",
"required": [
"chat_id",
"subscription_period",
"subscription_price"
],
"properties": {
"chat_id": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"name": {
"type": "string"
},
"subscription_period": {
"type": "integer"
},
"subscription_price": {
"type": "integer"
}
}
}
},
"multipart/form-data": {
"schema": {
"type": "object",
"required": [
"chat_id",
"subscription_period",
"subscription_price"
],
"properties": {
"chat_id": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"name": {
"type": "string"
},
"subscription_period": {
"type": "integer"
},
"subscription_price": {
"type": "integer"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Request was successful, the result is returned.",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Success"
},
{
"type": "object",
"properties": {
"result": {
"$ref": "#/components/schemas/ChatInviteLink"
}
}
}
]
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"409": {
"$ref": "#/components/responses/Conflict"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
},
"5XX": {
"$ref": "#/components/responses/ServerError"
},
"default": {
"$ref": "#/components/responses/UnknownError"
}
}
}
},
"/editChatSubscriptionInviteLink": {
"description": "Use this method to edit a subscription invite link created by the bot. The bot must have the can_invite_users administrator rights. Returns the edited invite link as a ChatInviteLink object.",
"post": {
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"chat_id",
"invite_link"
],
"properties": {
"chat_id": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"invite_link": {
"type": "string"
},
"name": {
"type": "string"
}
}
}
},
"application/x-www-form-urlencoded": {
"schema": {
"type": "object",
"required": [
"chat_id",
"invite_link"
],
"properties": {
"chat_id": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"invite_link": {
"type": "string"
},
"name": {
"type": "string"
}
}
}
},
"multipart/form-data": {
"schema": {
"type": "object",
"required": [
"chat_id",
"invite_link"
],
"properties": {
"chat_id": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"invite_link": {
"type": "string"
},
"name": {
"type": "string"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Request was successful, the result is returned.",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Success"
},
{
"type": "object",
"properties": {
"result": {
"$ref": "#/components/schemas/ChatInviteLink"
}
}
}
]
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"409": {
"$ref": "#/components/responses/Conflict"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
},
"5XX": {
"$ref": "#/components/responses/ServerError"
},
"default": {
"$ref": "#/components/responses/UnknownError"
}
}
}
},
"/revokeChatInviteLink": {
"description": "Use this method to revoke an invite link created by the bot. If the primary link is revoked, a new link is automatically generated. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the revoked invite link as ChatInviteLink object.",
"post": {
@ -15782,11 +16114,10 @@
"application/json": {
"schema": {
"type": "object",
"required": [
"chat_id",
"message_id"
],
"properties": {
"business_connection_id": {
"type": "string"
},
"chat_id": {
"anyOf": [
{
@ -15803,17 +16134,20 @@
"disable_notification": {
"type": "boolean"
}
}
},
"required": [
"chat_id",
"message_id"
]
}
},
"application/x-www-form-urlencoded": {
"schema": {
"type": "object",
"required": [
"chat_id",
"message_id"
],
"properties": {
"business_connection_id": {
"type": "string"
},
"chat_id": {
"anyOf": [
{
@ -15830,17 +16164,20 @@
"disable_notification": {
"type": "boolean"
}
}
},
"required": [
"chat_id",
"message_id"
]
}
},
"multipart/form-data": {
"schema": {
"type": "object",
"required": [
"chat_id",
"message_id"
],
"properties": {
"business_connection_id": {
"type": "string"
},
"chat_id": {
"anyOf": [
{
@ -15857,7 +16194,11 @@
"disable_notification": {
"type": "boolean"
}
}
},
"required": [
"chat_id",
"message_id"
]
}
}
}
@ -15921,10 +16262,10 @@
"application/json": {
"schema": {
"type": "object",
"required": [
"chat_id"
],
"properties": {
"business_connection_id": {
"type": "string"
},
"chat_id": {
"anyOf": [
{
@ -15938,16 +16279,19 @@
"message_id": {
"type": "integer"
}
}
},
"required": [
"chat_id"
]
}
},
"application/x-www-form-urlencoded": {
"schema": {
"type": "object",
"required": [
"chat_id"
],
"properties": {
"business_connection_id": {
"type": "string"
},
"chat_id": {
"anyOf": [
{
@ -15961,16 +16305,19 @@
"message_id": {
"type": "integer"
}
}
},
"required": [
"chat_id"
]
}
},
"multipart/form-data": {
"schema": {
"type": "object",
"required": [
"chat_id"
],
"properties": {
"business_connection_id": {
"type": "string"
},
"chat_id": {
"anyOf": [
{
@ -15984,7 +16331,10 @@
"message_id": {
"type": "integer"
}
}
},
"required": [
"chat_id"
]
}
}
}
@ -17234,7 +17584,7 @@
}
},
"/editForumTopic": {
"description": "Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.",
"description": "Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.",
"post": {
"requestBody": {
"required": true,
@ -17902,7 +18252,7 @@
}
},
"/editGeneralForumTopic": {
"description": "Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights. Returns True on success.",
"description": "Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns True on success.",
"post": {
"requestBody": {
"required": true,

View File

@ -2,7 +2,7 @@ openapi: 3.0.0
info:
title: 'Telegram Bot API'
description: 'Auto-generated OpenAPI schema by TGScraper.'
version: 7.7.0
version: 7.9.0
servers:
-
url: 'https://api.telegram.org/bot{token}'
@ -214,6 +214,8 @@ components:
type: boolean
can_connect_to_business:
type: boolean
has_main_web_app:
type: boolean
type: object
Chat:
description: 'This object represents a chat.'
@ -1852,6 +1854,10 @@ components:
type: integer
pending_join_request_count:
type: integer
subscription_period:
type: integer
subscription_price:
type: integer
type: object
ChatAdministratorRights:
description: 'Represents the rights of an administrator in a chat.'
@ -2023,6 +2029,8 @@ components:
type: string
user:
$ref: '#/components/schemas/User'
until_date:
type: integer
type: object
ChatMemberRestricted:
description: 'Represents a chat member that is under certain restrictions in the chat. Supergroups only.'
@ -2236,6 +2244,8 @@ components:
$ref: '#/components/schemas/ReactionTypeEmoji'
-
$ref: '#/components/schemas/ReactionTypeCustomEmoji'
-
$ref: '#/components/schemas/ReactionTypePaid'
ReactionTypeEmoji:
description: 'The reaction is based on an emoji.'
required:
@ -2258,6 +2268,14 @@ components:
custom_emoji_id:
type: string
type: object
ReactionTypePaid:
description: 'The reaction is paid.'
required:
- type
properties:
type:
type: string
type: object
ReactionCount:
description: 'Represents a reaction added to a message along with the number of times it was added.'
required:
@ -4136,6 +4154,10 @@ components:
$ref: '#/components/schemas/User'
invoice_payload:
type: string
paid_media:
type: array
items:
$ref: '#/components/schemas/PaidMedia'
type: object
TransactionPartnerFragment:
description: 'Describes a withdrawal transaction with Fragment.'
@ -7121,7 +7143,7 @@ paths:
default:
$ref: '#/components/responses/UnknownError'
/sendPaidMedia:
description: 'Use this method to send paid media to channel chats. On success, the sent Message is returned.'
description: 'Use this method to send paid media. On success, the sent Message is returned.'
post:
requestBody:
required: true
@ -7129,11 +7151,9 @@ paths:
application/json:
schema:
type: object
required:
- chat_id
- star_count
- media
properties:
business_connection_id:
type: string
chat_id:
anyOf:
-
@ -7172,14 +7192,16 @@ paths:
$ref: '#/components/schemas/ReplyKeyboardRemove'
-
$ref: '#/components/schemas/ForceReply'
required:
- chat_id
- star_count
- media
application/x-www-form-urlencoded:
schema:
type: object
required:
- chat_id
- star_count
- media
properties:
business_connection_id:
type: string
chat_id:
anyOf:
-
@ -7218,14 +7240,16 @@ paths:
$ref: '#/components/schemas/ReplyKeyboardRemove'
-
$ref: '#/components/schemas/ForceReply'
required:
- chat_id
- star_count
- media
multipart/form-data:
schema:
type: object
required:
- chat_id
- star_count
- media
properties:
business_connection_id:
type: string
chat_id:
anyOf:
-
@ -7264,6 +7288,10 @@ paths:
$ref: '#/components/schemas/ReplyKeyboardRemove'
-
$ref: '#/components/schemas/ForceReply'
required:
- chat_id
- star_count
- media
responses:
200:
description: 'Request was successful, the result is returned.'
@ -8482,7 +8510,7 @@ paths:
default:
$ref: '#/components/responses/UnknownError'
/setMessageReaction:
description: "Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Returns True on success."
description: "Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can't use paid reactions. Returns True on success."
post:
requestBody:
required: true
@ -9780,6 +9808,189 @@ paths:
$ref: '#/components/responses/ServerError'
default:
$ref: '#/components/responses/UnknownError'
/createChatSubscriptionInviteLink:
description: 'Use this method to create a subscription invite link for a channel chat. The bot must have the can_invite_users administrator rights. The link can be edited using the method editChatSubscriptionInviteLink or revoked using the method revokeChatInviteLink. Returns the new invite link as a ChatInviteLink object.'
post:
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- chat_id
- subscription_period
- subscription_price
properties:
chat_id:
anyOf:
-
type: integer
-
type: string
name:
type: string
subscription_period:
type: integer
subscription_price:
type: integer
application/x-www-form-urlencoded:
schema:
type: object
required:
- chat_id
- subscription_period
- subscription_price
properties:
chat_id:
anyOf:
-
type: integer
-
type: string
name:
type: string
subscription_period:
type: integer
subscription_price:
type: integer
multipart/form-data:
schema:
type: object
required:
- chat_id
- subscription_period
- subscription_price
properties:
chat_id:
anyOf:
-
type: integer
-
type: string
name:
type: string
subscription_period:
type: integer
subscription_price:
type: integer
responses:
200:
description: 'Request was successful, the result is returned.'
content:
application/json:
schema:
allOf:
-
$ref: '#/components/schemas/Success'
-
type: object
properties:
result:
$ref: '#/components/schemas/ChatInviteLink'
400:
$ref: '#/components/responses/BadRequest'
401:
$ref: '#/components/responses/Unauthorized'
403:
$ref: '#/components/responses/Forbidden'
404:
$ref: '#/components/responses/NotFound'
409:
$ref: '#/components/responses/Conflict'
429:
$ref: '#/components/responses/TooManyRequests'
5XX:
$ref: '#/components/responses/ServerError'
default:
$ref: '#/components/responses/UnknownError'
/editChatSubscriptionInviteLink:
description: 'Use this method to edit a subscription invite link created by the bot. The bot must have the can_invite_users administrator rights. Returns the edited invite link as a ChatInviteLink object.'
post:
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- chat_id
- invite_link
properties:
chat_id:
anyOf:
-
type: integer
-
type: string
invite_link:
type: string
name:
type: string
application/x-www-form-urlencoded:
schema:
type: object
required:
- chat_id
- invite_link
properties:
chat_id:
anyOf:
-
type: integer
-
type: string
invite_link:
type: string
name:
type: string
multipart/form-data:
schema:
type: object
required:
- chat_id
- invite_link
properties:
chat_id:
anyOf:
-
type: integer
-
type: string
invite_link:
type: string
name:
type: string
responses:
200:
description: 'Request was successful, the result is returned.'
content:
application/json:
schema:
allOf:
-
$ref: '#/components/schemas/Success'
-
type: object
properties:
result:
$ref: '#/components/schemas/ChatInviteLink'
400:
$ref: '#/components/responses/BadRequest'
401:
$ref: '#/components/responses/Unauthorized'
403:
$ref: '#/components/responses/Forbidden'
404:
$ref: '#/components/responses/NotFound'
409:
$ref: '#/components/responses/Conflict'
429:
$ref: '#/components/responses/TooManyRequests'
5XX:
$ref: '#/components/responses/ServerError'
default:
$ref: '#/components/responses/UnknownError'
/revokeChatInviteLink:
description: 'Use this method to revoke an invite link created by the bot. If the primary link is revoked, a new link is automatically generated. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the revoked invite link as ChatInviteLink object.'
post:
@ -10344,10 +10555,9 @@ paths:
application/json:
schema:
type: object
required:
- chat_id
- message_id
properties:
business_connection_id:
type: string
chat_id:
anyOf:
-
@ -10358,13 +10568,15 @@ paths:
type: integer
disable_notification:
type: boolean
required:
- chat_id
- message_id
application/x-www-form-urlencoded:
schema:
type: object
required:
- chat_id
- message_id
properties:
business_connection_id:
type: string
chat_id:
anyOf:
-
@ -10375,13 +10587,15 @@ paths:
type: integer
disable_notification:
type: boolean
required:
- chat_id
- message_id
multipart/form-data:
schema:
type: object
required:
- chat_id
- message_id
properties:
business_connection_id:
type: string
chat_id:
anyOf:
-
@ -10392,6 +10606,9 @@ paths:
type: integer
disable_notification:
type: boolean
required:
- chat_id
- message_id
responses:
200:
description: 'Request was successful, the result is returned.'
@ -10431,9 +10648,9 @@ paths:
application/json:
schema:
type: object
required:
- chat_id
properties:
business_connection_id:
type: string
chat_id:
anyOf:
-
@ -10442,12 +10659,14 @@ paths:
type: string
message_id:
type: integer
required:
- chat_id
application/x-www-form-urlencoded:
schema:
type: object
required:
- chat_id
properties:
business_connection_id:
type: string
chat_id:
anyOf:
-
@ -10456,12 +10675,14 @@ paths:
type: string
message_id:
type: integer
required:
- chat_id
multipart/form-data:
schema:
type: object
required:
- chat_id
properties:
business_connection_id:
type: string
chat_id:
anyOf:
-
@ -10470,6 +10691,8 @@ paths:
type: string
message_id:
type: integer
required:
- chat_id
responses:
200:
description: 'Request was successful, the result is returned.'
@ -11236,7 +11459,7 @@ paths:
default:
$ref: '#/components/responses/UnknownError'
/editForumTopic:
description: 'Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.'
description: 'Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.'
post:
requestBody:
required: true
@ -11653,7 +11876,7 @@ paths:
default:
$ref: '#/components/responses/UnknownError'
/editGeneralForumTopic:
description: "Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights. Returns True on success."
description: "Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns True on success."
post:
requestBody:
required: true

View File

@ -3,7 +3,7 @@
"name": "Telegram Bot API",
"description": "Auto-generated Postman collection by TGScraper.",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"version": "7.7.0"
"version": "7.9.0"
},
"variable": {
"key": "token",
@ -1458,10 +1458,16 @@
"body": {
"mode": "formdata",
"formdata": [
{
"key": "business_connection_id",
"disabled": true,
"description": "Optional. Unique identifier of the business connection on behalf of which the message will be sent",
"type": "text"
},
{
"key": "chat_id",
"disabled": false,
"description": "Required. Unique identifier for the target chat or username of the target channel (in the format @channelusername)",
"description": "Required. Unique identifier for the target chat or username of the target channel (in the format @channelusername). If the chat is a channel, all Telegram Star proceeds from this media will be credited to the chat's balance. Otherwise, they will be credited to the bot's balance.",
"type": "text"
},
{
@ -1539,7 +1545,7 @@
"sendPaidMedia"
]
},
"description": "Use this method to send paid media to channel chats. On success, the sent Message is returned."
"description": "Use this method to send paid media. On success, the sent Message is returned."
}
},
{
@ -2252,7 +2258,7 @@
{
"key": "reaction",
"disabled": true,
"description": "Optional. A JSON-serialized list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators.",
"description": "Optional. A JSON-serialized list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators. Paid reactions can't be used by bots.",
"type": "text"
},
{
@ -2276,7 +2282,7 @@
"setMessageReaction"
]
},
"description": "Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Returns True on success."
"description": "Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can't use paid reactions. Returns True on success."
}
},
{
@ -2935,6 +2941,98 @@
"description": "Use this method to edit a non-primary invite link created by the bot. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the edited invite link as a ChatInviteLink object."
}
},
{
"name": "createChatSubscriptionInviteLink",
"request": {
"method": "POST",
"body": {
"mode": "formdata",
"formdata": [
{
"key": "chat_id",
"disabled": false,
"description": "Required. Unique identifier for the target channel chat or username of the target channel (in the format @channelusername)",
"type": "text"
},
{
"key": "name",
"disabled": true,
"description": "Optional. Invite link name; 0-32 characters",
"type": "text"
},
{
"key": "subscription_period",
"disabled": false,
"description": "Required. The number of seconds the subscription will be active for before the next payment. Currently, it must always be 2592000 (30 days).",
"type": "text"
},
{
"key": "subscription_price",
"disabled": false,
"description": "Required. The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat; 1-2500",
"type": "text"
}
]
},
"url": {
"raw": "https://api.telegram.org/bot{{token}}/createChatSubscriptionInviteLink",
"protocol": "https",
"host": [
"api",
"telegram",
"org"
],
"path": [
"bot{{token}}",
"createChatSubscriptionInviteLink"
]
},
"description": "Use this method to create a subscription invite link for a channel chat. The bot must have the can_invite_users administrator rights. The link can be edited using the method editChatSubscriptionInviteLink or revoked using the method revokeChatInviteLink. Returns the new invite link as a ChatInviteLink object."
}
},
{
"name": "editChatSubscriptionInviteLink",
"request": {
"method": "POST",
"body": {
"mode": "formdata",
"formdata": [
{
"key": "chat_id",
"disabled": false,
"description": "Required. Unique identifier for the target chat or username of the target channel (in the format @channelusername)",
"type": "text"
},
{
"key": "invite_link",
"disabled": false,
"description": "Required. The invite link to edit",
"type": "text"
},
{
"key": "name",
"disabled": true,
"description": "Optional. Invite link name; 0-32 characters",
"type": "text"
}
]
},
"url": {
"raw": "https://api.telegram.org/bot{{token}}/editChatSubscriptionInviteLink",
"protocol": "https",
"host": [
"api",
"telegram",
"org"
],
"path": [
"bot{{token}}",
"editChatSubscriptionInviteLink"
]
},
"description": "Use this method to edit a subscription invite link created by the bot. The bot must have the can_invite_users administrator rights. Returns the edited invite link as a ChatInviteLink object."
}
},
{
"name": "revokeChatInviteLink",
"request": {
@ -3195,6 +3293,12 @@
"body": {
"mode": "formdata",
"formdata": [
{
"key": "business_connection_id",
"disabled": true,
"description": "Optional. Unique identifier of the business connection on behalf of which the message will be pinned",
"type": "text"
},
{
"key": "chat_id",
"disabled": false,
@ -3238,6 +3342,12 @@
"body": {
"mode": "formdata",
"formdata": [
{
"key": "business_connection_id",
"disabled": true,
"description": "Optional. Unique identifier of the business connection on behalf of which the message will be unpinned",
"type": "text"
},
{
"key": "chat_id",
"disabled": false,
@ -3247,7 +3357,7 @@
{
"key": "message_id",
"disabled": true,
"description": "Optional. Identifier of a message to unpin. If not specified, the most recent pinned message (by sending date) will be unpinned.",
"description": "Optional. Identifier of the message to unpin. Required if business_connection_id is specified. If not specified, the most recent pinned message (by sending date) will be unpinned.",
"type": "text"
}
]
@ -3647,7 +3757,7 @@
"editForumTopic"
]
},
"description": "Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success."
"description": "Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success."
}
},
{
@ -3832,7 +3942,7 @@
"editGeneralForumTopic"
]
},
"description": "Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights. Returns True on success."
"description": "Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns True on success."
}
},
{