Documentation of Types

Documentation of Types in EN


Tipos

Update

Este objeto representa uma atualização vinda. Ao menos um dos parâmetros opcionais devem estar presentes em alguma atualização.

CampoTipoRequeridoDescrição
update_idInteger (Número)true (Verdadeiro)O identificador da atualização. Atualização dos identificadores começam de um certo numero positivo e aumentam gradativamente. Este ID torna-se especialmente útil se você estiver usúando Webhooks, já que isso te permite ignorar atualizações repetidas ou restaurar a sequência de atualização correta, eles devem chegar fora de ordem. Se não houver novas atualizações por pelos uma semana, o identificador da próxima atualização será escolhido aleatoriamente ao invés de sequencialmente.
message (Mensagem)Messagefalse (Falso)Nova mensagem recebida de qualquer tipo — texto, foto, sticker, etc.
edited_messageMessagefalse (Falso)Nova versão de uma mensagem que é conhecida pelo bot e foi editada
channel_postMessagefalse (Falso)Nova postagem de canal recebida de qualquer tipo — texto, foto, sticker, etc.
edited_channel_postMessagefalse (Falso)Nova versão de uma postagem de canal que é conhecida pelo bot e foi editada
inline_queryInlineQuery (Consulta Inline)false (Falso)Nova consulta inline recebida
chosen_inline_resultChosenInlineResultfalse (Falso)O resultado de uma consulta inline que foi escolhida por um usuário e enviada para seu parceiro de chat. Por favor, consulte a nossa documentação sobre coleta de "feedback" para obter mais detalhes de como ativar esse Update em seu bot.
callback_queryCallbackQueryfalse (Falso)Nova consulta de callback query recebida
shipping_queryShippingQueryfalse (Falso)Nova consulta de shipping query recebida. Somente para chamadas de voz com preço flexível
pre_checkout_queryPreCheckoutQueryfalse (Falso)Nova consulta de pré-pagamento. Contém informações completas sobre o pagamento

WebhookInfo

Contém informações sobre o status atual de um webhook.

CampoTipoRequeridoDescrição
urlString (Sequência de caracteres)true (Verdadeiro)Webhook URL, pode ser vazia se o webhook não estiver configurado
has_custom_certificateBoolen (Boleano)true (Verdadeiro)Se isso estive como "true", um certificado deve ser fornecido para uso de verificação da integração do webhook.
pending_update_countInteger (Número)true (Verdadeiro)Número de atualizações esperando entrega
last_error_dateInteger (Número)false (Falso)Unix time para o erro mais recente que ocorreu ao tentar entregar uma atualização via webhook
last_error_messageString (Sequência de caracteres)false (Falso)Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook
max_connectionsInteger (Número)false (Falso)Número máximo permitido de conexões simultâneas HTTPS para o webhook para a entrega de atualizações
allowed_updatesArray de Stringfalse (Falso)Uma lista de tipos de atualização que o bot está inscrito. Padrão para todos os tipos de atualização

User

Esse objeto representa um usuário ou um bot do Telegram.

CampoTipoRequeridoDescrição
idInteger (Número)true (Verdadeiro)Identificador exclusivo para esse usuário ou bot
is_botBoolen (Boleano)true (Verdadeiro)Verdadeiro, se esse usuário é um bot
first_nameString (Sequência de caracteres)true (Verdadeiro)Primeiro nome de um usuário ou um bot
last_nameString (Sequência de caracteres)false (Falso)Sobrenome de um usuário ou um bot
usernameString (Sequência de caracteres)false (Falso)Nome de usuário de um usuário ou um bot
language_codeString (Sequência de caracteres)false (Falso)IETF language tag of the user's language

Chat

Esse objeto representa um chat.

CampoTipoRequeridoDescrição
idInteger (Número)true (Verdadeiro)Identificador exclusivo para esse chat. Esse número pode ser maior que 32 bits e algumas linguagens de programação podem ter defeitos de dificuldade/silenciação na interpretação. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.
tipoString (Sequência de caracteres)true (Verdadeiro)Tipo de chat, pode ser tanto quanto “privado”, “grupo”, “supergrupo” ou “canal”
títuloString (Sequência de caracteres)false (Falso)Título, para supergrupos, canais e grupos
usernameString (Sequência de caracteres)false (Falso)Nome de usuário, para chats privados, supergrupos e canais, se disponível
first_nameString (Sequência de caracteres)false (Falso)Primeiro nome da outra parte em um chat privado
last_nameString (Sequência de caracteres)false (Falso)Sobrenome da outra parte em um chat privado
all_members_are_administratorsBoolen (Boleano)false (Falso)Verdadeiro, se um grupo tem “Todos os Membros são Admins” ativado.
photoChatPhotofalse (Falso)Foto do Chat. Retornado somente em getChat.
descriptionString (Sequência de caracteres)false (Falso)Descrição, para supergrupos e canais. Retornado somente em getChat.
invite_linkString (Sequência de caracteres)false (Falso)Link de convite do chat, para supergrupos e canais. Retornado somente em getChat.
pinned_messageMessage (Mensagem)false (Falso)Mensagem fixada, para supergrupos e canais. Retornado somente em getChat.
sticker_set_nameString (Sequência de caracteres)false (Falso)Para supergrupos, nome do pacote de sticker do grupo. Retornado somente em getChat.
can_set_sticker_setBoolen (Boleano)false (Falso)Verdadeiro, se o bot pode alterar o pacote de sticker do grupo. Retornado somente em getChat.

Message

Esse objeto representa uma mensagem.

CampoTipoRequeridoDescrição
message_idInteger (Número)true (Verdadeiro)Identificador exclusivo de mensagem dentro deste chat
fromUserfalse (Falso)Remetente, vazio para mensagens enviadas para canais
dateInteger (Número)true (Verdadeiro)Data em que a mensagem foi enviada em Unix time
chatChattrue (Verdadeiro)Conversation the message belongs to
forward_fromUserfalse (Falso)Para mensagens encaminhadas, remetente da mensagem original
forward_from_chatChatfalse (Falso)Para mensagens encaminhadas de canais, informações sobre o canal original
forward_from_message_idInteger (Número)false (Falso)Para mensagens encaminhadas de canais, identificador da mensagem original no canal
forward_signatureString (Sequência de caracteres)false (Falso)Para mensagens encaminhadas de canais, a assinatura do autor da postagem se houver
forward_dateInteger (Número)false (Falso)Para mensagens encaminhadas, data em que a mensagem original foi enviada em Unix time
reply_to_messageMessage (Mensagem)false (Falso)Para respostas, a mensagem original. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply.
edit_dateInteger (Número)false (Falso)Data em que a mensagem foi editada pela última vez em Unix time
media_group_idString (Sequência de caracteres)false (Falso)O identificador exclusivo de uma mensagem de mídia que pertence ao grupo
author_signatureString (Sequência de caracteres)false (Falso)Assinatura do autor da postagem para mensagens em canais
textString (Sequência de caracteres)false (Falso)Para mensagens de texto, o texto atual da mensagem em UTF-8, 0-4096 caracteres.
entitiesArray de MessageEntityfalse (Falso)Para mensagens de texto, entidades especiais como nomes de usuário, URLs, comandos do bot, etc. que aparecem no texto
caption_entitiesArray de MessageEntityfalse (Falso)Para mensagens com uma legenda, entidades especiais como nomes de usuário, URLs, comandos do bot, etc. que aparecem na legenda
audioAudiofalse (Falso)Mensagem é um arquivo de áudio, informações sobre o arquivo
documentDocumentfalse (Falso)Mensagem é um arquivo, informações sobre o arquivo
gameGamefalse (Falso)Mensagem é um jogo, informações sobre o arquivo. Mais sobre jogos »
photoArray de PhotoSizefalse (Falso)Message is a photo, available sizes of the photo
stickerStickerfalse (Falso)Message is a sticker, information about the sticker
videoVideofalse (Falso)Message is a video, information about the video
voiceVoicefalse (Falso)Message is a voice message, information about the file
video_noteVideoNotefalse (Falso)Message is a video note, information about the video message
captionString (Sequência de caracteres)false (Falso)Caption for the audio, document, photo, video or voice, 0-200 characters
contactContactfalse (Falso)Message is a shared contact, information about the contact
locationLocationfalse (Falso)Message is a shared location, information about the location
venueVenuefalse (Falso)Message is a venue, information about the venue
new_chat_membersArray de Usuáriofalse (Falso)Novos membros que foram adicionados ao grupo ou supergrupo e informações sobre o mesmo (o bot em si pode ser um desses membros)
left_chat_memberUserfalse (Falso)Um membro foi removido do grupo, informações sobre o mesmo (esse membro pode ser o próprio bot)
new_chat_titleString (Sequência de caracteres)false (Falso)Um título do chat foi alterado para este valor
new_chat_photoArray de PhotoSizefalse (Falso)A chat photo was change to this value
delete_chat_photoTrue (Verdadeiro)false (Falso)Mensagem de serviço: a foto do chat foi apagada
group_chat_createdTrue (Verdadeiro)false (Falso)Mensagem de serviço: o grupo foi criado
supergroup_chat_createdTrue (Verdadeiro)false (Falso)Service message: the supergroup has been created. This field can‘t be received in a message coming through updates, because bot can’t be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup.
channel_chat_createdTrue (Verdadeiro)false (Falso)Mensagem de serviço: o canal foi criado. This field can‘t be received in a message coming through updates, because bot can’t be a member of a channel when it is created. It can only be found in reply_to_message if someone replies to a very first message in a channel.
migrate_to_chat_idInteger (Número)false (Falso)The group has been migrated to a supergroup with the specified identifier. Esse número pode ser maior que 32 bits e algumas linguagens de programação podem ter defeitos de dificuldade/silenciação na interpretação. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.
migrate_from_chat_idInteger (Número)false (Falso)The supergroup has been migrated from a group with the specified identifier. Esse número pode ser maior que 32 bits e algumas linguagens de programação podem ter defeitos de dificuldade/silenciação na interpretação. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.
pinned_messageMessage (Mensagem)false (Falso)Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it is itself a reply.
invoiceInvoicefalse (Falso)Message is an invoice for a payment, information about the invoice. More about payments »
successful_paymentSuccessfulPaymentfalse (Falso)Message is a service message about a successful payment, information about the payment. More about payments »
connected_websiteString (Sequência de caracteres)false (Falso)The domain name of the website on which the user has logged in. More about Telegram Login »

MessageEntity

Esse objeto representa uma entidade especial em uma mensagem de texto. Por exemplo, hashtags, nomes de usuário, URLs, etc.

CampoTipoRequeridoDescrição
tipoString (Sequência de caracteres)true (Verdadeiro)Tipo da entidade. Can be mention (@username), hashtag, bot_command, url, email, bold (bold text), italic (italic text), code (monowidth string), pre (monowidth block), text_link (for clickable text URLs), text_mention (for users without usernames)
offsetInteger (Número)true (Verdadeiro)Offset in UTF-16 code units to the start of the entity
lenghtInteger (Número)true (Verdadeiro)Length of the entity in UTF-16 code units
urlString (Sequência de caracteres)false (Falso)For “text_link” only, url that will be opened after user taps on the text
userUserfalse (Falso)For “text_mention” only, the mentioned user

PhotoSize

Este objeto representa um tamanho de uma foto ou a miniatura de um arquivo/sticker.

CampoTipoRequeridoDescrição
file_idString (Sequência de caracteres)true (Verdadeiro)Identificador exclusivo desse arquivo
widthInteger (Número)true (Verdadeiro)Largura da foto
heightInteger (Número)true (Verdadeiro)Altura da foto
file_sizeInteger (Número)false (Falso)Tamanho do arquivo

Audio

This object represents an audio file to be treated as music by the Telegram clients.

CampoTipoRequeridoDescrição
file_idString (Sequência de caracteres)true (Verdadeiro)Identificador exclusivo desse arquivo
durationInteger (Número)true (Verdadeiro)Duração do áudio em segundos conforme definido pelo remetente
artistaString (Sequência de caracteres)false (Falso)Performer of the audio as defined by sender or by audio tags
titleString (Sequência de caracteres)false (Falso)Título do áudio conforme definido pelo remetente ou por tags de áudio
mime_typeString (Sequência de caracteres)false (Falso)Tipo MIME do arquivo conforme definido pelo remetente
file_sizeInteger (Número)false (Falso)Tamanho do arquivo

Document

This object represents a general file (as opposed to photos, voice messages and audio files).

CampoTipoRequeridoDescrição
file_idString (Sequência de caracteres)true (Verdadeiro)Identificador exclusivo do arquivo
thumbPhotoSizefalse (Falso)Document thumbnail as defined by sender
file_nameString (Sequência de caracteres)false (Falso)Original filename as defined by sender
mime_typeString (Sequência de caracteres)false (Falso)Tipo MIME do arquivo conforme definido pelo remetente
file_sizeInteger (Número)false (Falso)Tamanho do arquivo

Video

Esse objeto representa um arquivo de vídeo.

CampoTipoRequeridoDescrição
file_idString (Sequência de caracteres)true (Verdadeiro)Identificador exclusivo desse arquivo
widthInteger (Número)true (Verdadeiro)Video width as defined by sender
heightInteger (Número)true (Verdadeiro)Video height as defined by sender
durationInteger (Número)true (Verdadeiro)Duração do vídeo em segundos conforme definido pelo remetente
thumbPhotoSizefalse (Falso)Miniatura do vídeo
mime_typeString (Sequência de caracteres)false (Falso)Mime type of a file as defined by sender
file_sizeInteger (Número)false (Falso)Tamanho do arquivo

Voice

This object represents a voice note.

CampoTipoRequeridoDescrição
file_idString (Sequência de caracteres)true (Verdadeiro)Identificador exclusivo desse arquivo
durationInteger (Número)true (Verdadeiro)Duração do áudio em segundos conforme definido pelo remetente
mime_typeString (Sequência de caracteres)false (Falso)Tipo MIME do arquivo conforme definido pelo remetente
file_sizeInteger (Número)false (Falso)Tamanho do arquivo

VideoNote

Esse objeto representa uma mensagem de vídeo (disponível em apps Telegram como v.4.0).

CampoTipoRequeridoDescrição
file_idString (Sequência de caracteres)true (Verdadeiro)Identificador exclusivo desse arquivo
lenghtInteger (Número)true (Verdadeiro)Video width and height as defined by sender
durationInteger (Número)true (Verdadeiro)Duração do vídeo em segundos conforme definido pelo remetente
thumbPhotoSizefalse (Falso)Miniatura do vídeo
file_sizeInteger (Número)false (Falso)Tamanho do arquivo

Contact

Esse objeto representa um telefone de contato.

CampoTipoRequeridoDescrição
phone_numberString (Sequência de caracteres)true (Verdadeiro)Número de telefone do contato
first_nameString (Sequência de caracteres)true (Verdadeiro)Primeiro nome do contato
last_nameString (Sequência de caracteres)false (Falso)Último nome do contato
user_idInteger (Número)false (Falso)Contact's user identifier in Telegram

Location

Esse objeto representa um ponto no mapa.

CampoTipoRequeridoDescrição
longitudeFloattrue (Verdadeiro)Longitude conforme definido pelo remetente
latitudeFloattrue (Verdadeiro)Latitude conforme definido pelo remetente

Venue

This object represents a venue.

CampoTipoRequeridoDescrição
locationLocationtrue (Verdadeiro)Venue location
titleString (Sequência de caracteres)true (Verdadeiro)Name of the venue
addressString (Sequência de caracteres)true (Verdadeiro)Address of the venue
foursquare_idString (Sequência de caracteres)false (Falso)Foursquare identifier of the venue

UserProfilePhotos

Esse objeto representa as fotos de perfil de um usuário.

CampoTipoRequeridoDescrição
total_countInteger (Número)true (Verdadeiro)Total number of profile pictures the target user has
photosArray de Array de PhotoSizetrue (Verdadeiro)Requested profile pictures (in up to 4 sizes each)

File

This object represents a file ready to be downloaded. The file can be downloaded via the link https://api.telegram.org/file/bot/. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling getFile.

CampoTipoRequeridoDescrição
file_idString (Sequência de caracteres)true (Verdadeiro)Identificador exclusivo desse arquivo
file_sizeInteger (Número)false (Falso)Tamanho do arquivo, se conhecido
file_pathString (Sequência de caracteres)false (Falso)Caminho do arquivo. Usar https://api.telegram.org/file/bot/ para obter o arquivo.

ReplyKeyboardMarkup

Esse objeto representa um teclado personalizado com opções de resposta (veja Introdução aos Bots para detalhes e exemplos).

CampoTipoRequeridoDescrição
keyboardArray de Array de KeyboardButtontrue (Verdadeiro)Array of button rows, each represented by an Array of KeyboardButton objects
resize_keyboardBoolen (Boleano)false (Falso)Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller if there are just two rows of buttons). Defaults to false, in which case the custom keyboard is always of the same height as the app's standard keyboard.
one_time_keyboardBoolen (Boleano)false (Falso)Requests clients to hide the keyboard as soon as it's been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat – the user can press a special button in the input field to see the custom keyboard again. Defaults to false.
selectiveBoolen (Boleano)false (Falso)Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.Example: A user requests to change the bot‘s language, bot replies to the request with a keyboard to select the new language. Other users in the group don’t see the keyboard.

KeyboardButton

This object represents one button of the reply keyboard. For simple text buttons String can be used instead of this object to specify text of the button. Optional fields are mutually exclusive.

CampoTipoRequeridoDescrição
textString (Sequência de caracteres)true (Verdadeiro)Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed
request_contactBoolen (Boleano)false (Falso)If True, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only
request_locationBoolen (Boleano)false (Falso)If True, the user's current location will be sent when the button is pressed. Available in private chats only

ReplyKeyboardRemove

Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard. By default, custom keyboards are displayed until a new keyboard is sent by a bot. An exception is made for one-time keyboards that are hidden immediately after the user presses a button (see ReplyKeyboardMarkup).

CampoTipoRequeridoDescrição
remove_keyboardTrue (Verdadeiro)true (Verdadeiro)Requests clients to remove the custom keyboard (user will not be able to summon this keyboard; if you want to hide the keyboard from sight but keep it accessible, use one_time_keyboard in ReplyKeyboardMarkup)
selectiveBoolen (Boleano)false (Falso)Use this parameter if you want to remove the keyboard for specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.Example: A user votes in a poll, bot returns confirmation message in reply to the vote and removes the keyboard for that user, while still showing the keyboard with poll options to users who haven't voted yet.

InlineKeyboardMarkup

This object represents an inline keyboard that appears right next to the message it belongs to.

CampoTipoRequeridoDescrição
inline_keyboardArray de Array de InlineKeyboardButtontrue (Verdadeiro)Array of button rows, each represented by an Array of InlineKeyboardButton objects

InlineKeyboardButton

This object represents one button of an inline keyboard. You must use exactly one of the optional fields.

CampoTipoRequeridoDescrição
textString (Sequência de caracteres)true (Verdadeiro)Label text on the button
urlString (Sequência de caracteres)false (Falso)HTTP url to be opened when button is pressed
callback_dataString (Sequência de caracteres)false (Falso)Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes
switch_inline_queryString (Sequência de caracteres)false (Falso)If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot‘s username and the specified inline query in the input field. Can be empty, in which case just the bot’s username will be inserted.Note: This offers an easy way for users to start using your bot in inline mode when they are currently in a private chat with it. Especially useful when combined with switch_pm… actions – in this case the user will be automatically returned to the chat they switched from, skipping the chat selection screen.
switch_inline_query_current_chatString (Sequência de caracteres)false (Falso)If set, pressing the button will insert the bot‘s username and the specified inline query in the current chat's input field. Can be empty, in which case only the bot’s username will be inserted.This offers a quick way for the user to open your bot in inline mode in the same chat – good for selecting something from multiple options.
callback_gameCallbackGamefalse (Falso)Description of the game that will be launched when the user presses the button.NOTE: This type of button must always be the first button in the first row.
payBoolen (Boleano)false (Falso)Specify True, to send a Pay button.NOTE: This type of button must always be the first button in the first row.

CallbackQuery

This object represents an incoming callback query from a callback button in an inline keyboard. If the button that originated the query was attached to a message sent by the bot, the field message will be present. If the button was attached to a message sent via the bot (in inline mode), the field inline_message_id will be present. Exactly one of the fields data or game_short_name will be present.

CampoTipoRequeridoDescrição
idString (Sequência de caracteres)true (Verdadeiro)Unique identifier for this query
fromUsertrue (Verdadeiro)Sender
messageMessage (Mensagem)false (Falso)Message with the callback button that originated the query. Note that message content and message date will not be available if the message is too old
inline_message_idString (Sequência de caracteres)false (Falso)Identifier of the message sent via the bot in inline mode, that originated the query.
chat_instanceString (Sequência de caracteres)true (Verdadeiro)Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games.
dataString (Sequência de caracteres)false (Falso)Data associated with the callback button. Be aware that a bad client can send arbitrary data in this field.
game_short_nameString (Sequência de caracteres)false (Falso)Short name of a Game to be returned, serves as the unique identifier for the game

ForceReply

Upon receiving a message with this object, Telegram clients will display a reply interface to the user (act as if the user has selected the bot‘s message and tapped ’Reply'). This can be extremely useful if you want to create user-friendly step-by-step interfaces without having to sacrifice privacy mode.

CampoTipoRequeridoDescrição
force_replyTrue (Verdadeiro)true (Verdadeiro)Shows reply interface to the user, as if they manually selected the bot‘s message and tapped ’Reply'
selectiveBoolen (Boleano)false (Falso)Use this parameter if you want to force reply from specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.

ChatPhoto

This object represents a chat photo.

CampoTipoRequeridoDescrição
small_file_idString (Sequência de caracteres)true (Verdadeiro)Unique file identifier of small (160x160) chat photo. This file_id can be used only for photo download.
big_file_idString (Sequência de caracteres)true (Verdadeiro)Unique file identifier of big (640x640) chat photo. This file_id can be used only for photo download.

ChatMember

This object contains information about one member of a chat.

CampoTipoRequeridoDescrição
userUsertrue (Verdadeiro)Information about the user
statusString (Sequência de caracteres)true (Verdadeiro)The member's status in the chat. Can be “creator”, “administrator”, “member”, “restricted”, “left” or “kicked”
until_dateInteger (Número)false (Falso)Restricted and kicked only. Date when restrictions will be lifted for this user, unix time
can_be_editedBoolen (Boleano)false (Falso)Administrators only. True, if the bot is allowed to edit administrator privileges of that user
can_change_infoBoolen (Boleano)false (Falso)Administrators only. True, if the administrator can change the chat title, photo and other settings
can_post_messagesBoolen (Boleano)false (Falso)Administrators only. True, if the administrator can post in the channel, channels only
can_edit_messagesBoolen (Boleano)false (Falso)Administrators only. True, if the administrator can edit messages of other users and can pin messages, channels only
can_delete_messagesBoolen (Boleano)false (Falso)Administrators only. True, if the administrator can delete messages of other users
can_invite_usersBoolen (Boleano)false (Falso)Administrators only. True, if the administrator can invite new users to the chat
can_restrict_membersBoolen (Boleano)false (Falso)Administrators only. True, if the administrator can restrict, ban or unban chat members
can_pin_messagesBoolen (Boleano)false (Falso)Administrators only. True, if the administrator can pin messages, supergroups only
can_promote_membersBoolen (Boleano)false (Falso)Administrators only. True, if the administrator can add new administrators with a subset of his own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)
can_send_messagesBoolen (Boleano)false (Falso)Restricted only. True, if the user can send text messages, contacts, locations and venues
can_send_media_messagesBoolen (Boleano)false (Falso)Restricted only. True, if the user can send audios, documents, photos, videos, video notes and voice notes, implies can_send_messages
can_send_other_messagesBoolen (Boleano)false (Falso)Restricted only. True, if the user can send animations, games, stickers and use inline bots, implies can_send_media_messages
can_add_web_page_previewsBoolen (Boleano)false (Falso)Restricted only. True, if user may add web page previews to his messages, implies can_send_media_messages

ResponseParameters

Contains information about why a request was unsuccessful.

CampoTipoRequeridoDescrição
migrate_to_chat_idInteger (Número)false (Falso)The group has been migrated to a supergroup with the specified identifier. Esse número pode ser maior que 32 bits e algumas linguagens de programação podem ter defeitos de dificuldade/silenciação na interpretação. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.
retry_afterInteger (Número)false (Falso)In case of exceeding flood control, the number of seconds left to wait before the request can be repeated

InputMediaPhoto

Represents a photo to be sent.

CampoTipoRequeridoDescrição
tipoString (Sequência de caracteres)true (Verdadeiro)Tipo do result, deve ser "photo"
mediaString (Sequência de caracteres)true (Verdadeiro)File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass "attach://" to upload a new one using multipart/form-data under name. More info on Sending Files »
captionString (Sequência de caracteres)false (Falso)Legenda da foto a ser enviada, 0-200 caracteres
parse_modeString (Sequência de caracteres)false (Falso)"Markdown" ou "HTML", se você quiser que os aplicativos mostrem formatação na legenda da foto.

InputMediaVideo

Represents a video to be sent.

CampoTipoRequeridoDescrição
tipoString (Sequência de caracteres)true (Verdadeiro)Tipo do result, deve ser "video"
mediaString (Sequência de caracteres)true (Verdadeiro)File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass "attach://" to upload a new one using multipart/form-data under name. More info on Sending Files »
captionString (Sequência de caracteres)false (Falso)Legenda da vídeo a ser enviada, 0-200 caracteres
parse_modeString (Sequência de caracteres)false (Falso)"Markdown" ou "HTML", se você quiser que os aplicativos mostrem formatação na legenda da foto.
widthInteger (Número)false (Falso)Largura do vídeo
heightInteger (Número)false (Falso)Altura do vídeo
durationInteger (Número)false (Falso)Duração do vídeo
supports_streamingBoolen (Boleano)false (Falso)Pass True, if the uploaded video is suitable for streaming

Sticker

This object represents a sticker.

CampoTipoRequeridoDescrição
file_idString (Sequência de caracteres)true (Verdadeiro)Identificador exclusivo desse arquivo
widthInteger (Número)true (Verdadeiro)Sticker width
heightInteger (Número)true (Verdadeiro)Sticker height
thumbPhotoSizefalse (Falso)Sticker thumbnail in the .webp or .jpg format
emojiString (Sequência de caracteres)false (Falso)Emoji associated with the sticker
set_nameString (Sequência de caracteres)false (Falso)Name of the sticker set to which the sticker belongs
mask_positionMaskPositionfalse (Falso)For mask stickers, the position where the mask should be placed
file_sizeInteger (Número)false (Falso)Tamanho do arquivo

StickerSet

This object represents a sticker set.

CampoTipoRequeridoDescrição
nameString (Sequência de caracteres)true (Verdadeiro)Sticker set name
titleString (Sequência de caracteres)true (Verdadeiro)Sticker set title
contains_masksBoolen (Boleano)true (Verdadeiro)True, if the sticker set contains masks
stickersArray of Stickertrue (Verdadeiro)List of all set stickers

MaskPosition

This object describes the position on faces where a mask should be placed by default.

CampoTipoRequeridoDescrição
pointString (Sequência de caracteres)true (Verdadeiro)The part of the face relative to which the mask should be placed. One of “forehead”, “eyes”, “mouth”, or “chin”.
x_shiftFloat númerotrue (Verdadeiro)Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. For example, choosing -1.0 will place mask just to the left of the default mask position.
y_shiftFloat númerotrue (Verdadeiro)Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. For example, 1.0 will place the mask just below the default mask position.
scaleFloat númerotrue (Verdadeiro)Mask scaling coefficient. For example, 2.0 means double size.

InlineQuery (Consulta Inline)

This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results.

CampoTipoRequeridoDescrição
idString (Sequência de caracteres)true (Verdadeiro)Unique identifier for this query
fromUsertrue (Verdadeiro)Sender
locationLocationfalse (Falso)Sender location, only for bots that request user location
queryString (Sequência de caracteres)true (Verdadeiro)Text of the query (up to 512 characters)
offsetString (Sequência de caracteres)true (Verdadeiro)Offset of the results to be returned, can be controlled by the bot

InputTextMessageContent

Represents the content of a text message to be sent as the result of an inline query.

CampoTipoRequeridoDescrição
message_textString (Sequência de caracteres)true (Verdadeiro)Text of the message to be sent, 1-4096 characters
parse_modeString (Sequência de caracteres)false (Falso)Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message.
disable_web_page_previewBoolen (Boleano)false (Falso)Disables link previews for links in the sent message

InputLocationMessageContent

Represents the content of a location message to be sent as the result of an inline query.

CampoTipoRequeridoDescrição
latitudeFloattrue (Verdadeiro)Latitude of the location in degrees
longitudeFloattrue (Verdadeiro)Longitude of the location in degrees
live_periodInteger (Número)false (Falso)Período em segundos para que a localização possa ser atualizada, deve estar entre 60 e 86400.

InputVenueMessageContent

Represents the content of a venue message to be sent as the result of an inline query.

CampoTipoRequeridoDescrição
latitudeFloattrue (Verdadeiro)Latitude of the venue in degrees
longitudeFloattrue (Verdadeiro)Longitude of the venue in degrees
titleString (Sequência de caracteres)true (Verdadeiro)Name of the venue
addressString (Sequência de caracteres)true (Verdadeiro)Address of the venue
foursquare_idString (Sequência de caracteres)false (Falso)Foursquare identifier of the venue, if known

InputContactMessageContent

Represents the content of a contact message to be sent as the result of an inline query.

CampoTipoRequeridoDescrição
phone_numberString (Sequência de caracteres)true (Verdadeiro)Número de telefone do contato
first_nameString (Sequência de caracteres)true (Verdadeiro)Primeiro nome do contato
last_nameString (Sequência de caracteres)false (Falso)Último nome do contato

ChosenInlineResult

Represents a result of an inline query that was chosen by the user and sent to their chat partner.

CampoTipoRequeridoDescrição
result_idString (Sequência de caracteres)true (Verdadeiro)The unique identifier for the result that was chosen
fromUsertrue (Verdadeiro)The user that chose the result
locationLocationfalse (Falso)Sender location, only for bots that require user location
inline_message_idString (Sequência de caracteres)false (Falso)Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message. Will be also received in callback queries and can be used to edit the message.
queryString (Sequência de caracteres)true (Verdadeiro)The query that was used to obtain the result

LabeledPrice

This object represents a portion of the price for goods or services.

CampoTipoRequeridoDescrição
labelString (Sequência de caracteres)true (Verdadeiro)Portion label
amountInteger (Número)true (Verdadeiro)Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).

Invoice

This object contains basic information about an invoice.

CampoTipoRequeridoDescrição
titleString (Sequência de caracteres)true (Verdadeiro)Product name
descriptionString (Sequência de caracteres)true (Verdadeiro)Product description
start_parameterString (Sequência de caracteres)true (Verdadeiro)Unique bot deep-linking parameter that can be used to generate this invoice
currencyString (Sequência de caracteres)true (Verdadeiro)Three-letter ISO 4217 currency code
total_amountInteger (Número)true (Verdadeiro)Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).

ShippingAddress

This object represents a shipping address.

CampoTipoRequeridoDescrição
country_codeString (Sequência de caracteres)true (Verdadeiro)ISO 3166-1 alpha-2 country code
stateString (Sequência de caracteres)true (Verdadeiro)State, if applicable
cityString (Sequência de caracteres)true (Verdadeiro)City
street_line1String (Sequência de caracteres)true (Verdadeiro)First line for the address
street_line2String (Sequência de caracteres)true (Verdadeiro)Second line for the address
post_codeString (Sequência de caracteres)true (Verdadeiro)Address post code

OrderInfo

This object represents information about an order.

CampoTipoRequeridoDescrição
nameString (Sequência de caracteres)false (Falso)User name
phone_numberString (Sequência de caracteres)false (Falso)User's phone number
emailString (Sequência de caracteres)false (Falso)User email
shipping_addressShippingAddressfalse (Falso)User shipping address

ShippingOption

This object represents one shipping option.

CampoTipoRequeridoDescrição
idString (Sequência de caracteres)true (Verdadeiro)Shipping option identifier
titleString (Sequência de caracteres)true (Verdadeiro)Option title
pricesArray of LabeledPricetrue (Verdadeiro)List of price portions

SuccessfulPayment

This object contains basic information about a successful payment.

CampoTipoRequeridoDescrição
currencyString (Sequência de caracteres)true (Verdadeiro)Three-letter ISO 4217 currency code
total_amountInteger (Número)true (Verdadeiro)Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).
invoice_payloadString (Sequência de caracteres)true (Verdadeiro)Bot specified invoice payload
shipping_option_idString (Sequência de caracteres)false (Falso)Identifier of the shipping option chosen by the user
order_infoOrderInfofalse (Falso)Order info provided by the user
telegram_payment_charge_idString (Sequência de caracteres)true (Verdadeiro)Telegram payment identifier
provider_payment_charge_idString (Sequência de caracteres)true (Verdadeiro)Provider payment identifier

ShippingQuery

This object contains information about an incoming shipping query.

CampoTipoRequeridoDescrição
idString (Sequência de caracteres)true (Verdadeiro)Unique query identifier
fromUsertrue (Verdadeiro)User who sent the query
invoice_payloadString (Sequência de caracteres)true (Verdadeiro)Bot specified invoice payload
shipping_addressShippingAddresstrue (Verdadeiro)User specified shipping address

PreCheckoutQuery

This object contains information about an incoming pre-checkout query.

CampoTipoRequeridoDescrição
idString (Sequência de caracteres)true (Verdadeiro)Unique query identifier
fromUsertrue (Verdadeiro)User who sent the query
currencyString (Sequência de caracteres)true (Verdadeiro)Three-letter ISO 4217 currency code
total_amountInteger (Número)true (Verdadeiro)Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).
invoice_payloadString (Sequência de caracteres)true (Verdadeiro)Bot specified invoice payload
shipping_option_idString (Sequência de caracteres)false (Falso)Identifier of the shipping option chosen by the user
order_infoOrderInfofalse (Falso)Order info provided by the user

Game

This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers.

CampoTipoRequeridoDescrição
titleString (Sequência de caracteres)true (Verdadeiro)Title of the game
descriptionString (Sequência de caracteres)true (Verdadeiro)Description of the game
photoArray de PhotoSizetrue (Verdadeiro)Photo that will be displayed in the game message in chats.
textString (Sequência de caracteres)false (Falso)Brief description of the game or high scores included in the game message. Can be automatically edited to include current high scores for the game when the bot calls setGameScore, or manually edited using editMessageText. 0-4096 characters.
text_entitiesArray de MessageEntityfalse (Falso)Special entities that appear in text, such as usernames, URLs, bot commands, etc.
animationAnimationfalse (Falso)Animation that will be displayed in the game message in chats. Upload via BotFather

Animation

You can provide an animation for your game so that it looks stylish in chats (check out Lumberjack for an example). This object represents an animation file to be displayed in the message containing a game.

CampoTipoRequeridoDescrição
file_idString (Sequência de caracteres)true (Verdadeiro)Identificador exclusivo do arquivo
thumbPhotoSizefalse (Falso)Animation thumbnail as defined by sender
file_nameString (Sequência de caracteres)false (Falso)Original animation filename as defined by sender
mime_typeString (Sequência de caracteres)false (Falso)Tipo MIME do arquivo conforme definido pelo remetente
file_sizeInteger (Número)false (Falso)Tamanho do arquivo

GameHighScore

Esse objeto representa uma linha da tabela de pontuações mais altas de um jogo.

CampoTipoRequeridoDescrição
positionInteger (Número)true (Verdadeiro)Posição na tabela de pontuação do jogo
userUsertrue (Verdadeiro)User
scoreInteger (Número)true (Verdadeiro)Pontuação