All methods in the Bot API are case-insensitive.Some errors may also have an optional field 'parameters' of the type ResponseParameters, which can help to automatically handle the error. An Integer 'error_code' field is also returned, but its contents are subject to change in the future. In case of an unsuccessful request, 'ok' equals false and the error is explained in the 'description'. If 'ok' equals True, the request was successful and the result of the query can be found in the 'result' field. The response contains a JSON object, which always has a Boolean field 'ok' and may have an optional String field 'description' with a human-readable description of the result. multipart/form-data (use to upload files).application/json (except for uploading files).We support four ways of passing parameters in Bot API requests: Making requestsĪll queries to the Telegram Bot API must be served over HTTPS and need to be presented in this form. You can learn about obtaining tokens and generating new ones in this document. The token looks something like 123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11, but we'll use simply in this document instead. See earlier changes » Authorizing your botĮach bot is given a unique authentication token when it is created. Added support for the choose_sticker action in the method sendChatAction.Added the methods approveChatJoinRequest and declineChatJoinRequest for managing requests to join the chat.The bot must be an administrator in the chat with the can_invite_users administrator right to receive these updates.
#Telegram spam bot update
Added updates about new requests to join the chat, represented by the class ChatJoinRequest and the field chat_join_request in the Update class.Added the field name to the class ChatInviteLink and the parameters name to the methods createChatInviteLink and editChatInviteLink for managing invite link names.Added the fields creates_join_request and pending_join_request_count to the class ChatInviteLink.Added the the parameter creates_join_request to the methods createChatInviteLink and editChatInviteLink for managing chat invite links that create join requests (read more about this on our blog).Note: As previously announced, user identifiers can now have up to 52 significant bits and require a 64-bit integer or double-precision float type to be stored safely. Bots are expected to use the field sender_chat in the class Message to correctly support such messages. Note: After this update users are able to send messages on behalf of channels they own. Use the fields has_protected_content in the classes Message and Chat to check this. Note: After this update it will become impossible to forward messages from some chats. Added the field is_automatic_forward to the class Message.Added the field has_protected_content to the classes Chat and Message.Added the field has_private_forwards to the class Chat for private chats, which can be used to check the possibility of mentioning the user by their ID.Added the methods banChatSenderChat and unbanChatSenderChat for banning and unbanning channel chats in supergroups and channels.Older clients will display unsupported message. This will only work in Telegram versions released after December 7, 2021. Added support for mentioning users by their ID in inline keyboards.Bots are now allowed to contact users who sent a join request to a chat where the bot is an administrator with the can_invite_users administrator right – even if the user never interacted with the bot before.Added the ability to specify spoiler entities using HTML and MarkdownV2 formatting options.Added new MessageEntity type “spoiler”.Added support for spoiler entities, which will work in Telegram versions released after December 30, 2021.Added the parameter protect_content to the methods sendMessage, sendPhoto, sendVideo, sendAnimation, sendAudio, sendDocument, sendSticker, sendVideoNote, sendVoice, sendLocation, sendVenue, sendContact, sendPoll, sendDice, sendInvoice, sendGame, sendMediaGroup, copyMessage, forwardMessage to allow sending messages with protected content to any chat.Improved support for Protected Content.Added the parameter webm_sticker to the methods createNewStickerSet and addStickerToSet.Added the field is_video to the classes Sticker and StickerSet.Subscribe to to be the first to know about the latest updates and join the discussion in January 31, 2022
#Telegram spam bot how to
To learn how to create and set up a bot, please consult our Introduction to Bots and Bot FAQ. The Bot API is an HTTP-based interface created for developers keen on building bots for Telegram.