Questions tagged [telegram-bot]

The Bot API is an HTTP-based interface created for developers keen on building bots for Telegram which is an instant-messaging app with documented API. Use this tag if you're writing a telegram bot and have a specific question regarding the Bot API.

Available methods

  • getMe
  • sendMessage
  • forwardMessage
  • sendPhoto
  • sendAudio
  • sendDocument
  • sendSticker
  • sendVideo
  • sendVideoNote
  • sendVoice
  • sendLocation
  • sendVenue
  • sendContact
  • sendChatAction
  • getUserProfilePhotos
  • getUpdates
  • setWebhook
  • removeWebhook
  • getFile

Links:

4905 questions
1
vote
2 answers

telegram bot login checking authorization not equal hash

I try to use telegram bot connect website, when I open the website, I get the query and hash when I validate throw node.js and not equal const key = crypto.createHash('sha256').update(my_bot_token).digest() const validateHash =…
lee alex
  • 11
  • 1
1
vote
1 answer

How to use editMessageCaption correctly in php Telegram Bot?

I want to edit caption of photo, but Im getting error Bad Request: message to edit not found Code : getData(); $text = $result['message']…
aman_49
  • 116
  • 10
1
vote
3 answers

Using a local file to edit image of a message in the Telegram channel

Method I'm using is based on the model I use to create a new image publication in the channel, with the modifications it currently looks like: import requests headers = { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)…
Digital Farmer
  • 1,705
  • 5
  • 17
  • 67
1
vote
1 answer

How to send a document to a Telegram Bot using pyTelegramBotAPI

I'm trying to develop a Telegram bot using pyTelegramBotAPI package and I need to output multiple documents when user enter an specific /command. I tried below code but it shows an error. def pca_papers(self, message): …
pasindu
  • 529
  • 1
  • 4
  • 16
1
vote
1 answer

is it possible to install copy protection in a telegram bot?

is it possible to install copy protection in a telegram bot? the bot sends docx files, images and text. I would like to make it so that they cannot be copied but can be viewed. I couldn't find anything in the telegram bot api documentation, I can't…
1
vote
1 answer

Is it possible to create a big text for sending to telegram bot?

I've created a telegram bot. He has one mission to inform in group about new orders. When the customer create new order, telegram bot sends message with information that new order was created. I use this api: ( Chat id and token are provided as an…
1
vote
0 answers

Goes to the wrong function in Python Telegram Bot

I'm sorry because I'm still a noob and still learning. This is my code : from telegram import InlineKeyboardButton, InlineKeyboardMarkup from telegram.ext import CallbackQueryHandler import telegram.ext import mysql.connector mydb =…
Blueman
  • 11
  • 4
1
vote
1 answer

how to delete telegram service message after 60 sec sent by BOT

i want to delete service message sent by bot after 60 sec. bot already admin of the group, and i use php for it when i send https://api.telegram.org/bottoken/sendMessage?chat_id=chatid&text=hello this is bot it returns nothing as it sent from…
priyabrata
  • 179
  • 15
1
vote
1 answer

Doesn't change the previously sent file in Telegram using the API

I send File Test.pdf on telegram by Telegram API. After several minutes, I have to do some editing in Test.pdf file and send it again. But at this moment the telegram sends previous Test.pdf file, without my edition. It seems telegram catched my url…
amir mahdi
  • 13
  • 3
1
vote
1 answer

Telegram Bots APIs - forward_from

I'm tring to acces the id of a user by a forwarded message but the value is always null, even if they don't have privacy of forwarded messages enabled, am I doing something wrong? $update = file_get_contents('php://input'); $update =…
user18216979
1
vote
1 answer

Querying existing webhooks

An existing application has webhooks set up with the Telegram API. A newer application want to use the same bot to send messages, eventually with the same named action webhook. Initially, one would want to first query existing webhooks to identify…
Jerome
  • 5,583
  • 3
  • 33
  • 76
1
vote
0 answers

Python Telegram Bot ensure state changes in Job callback

I've scheduled a Job which sends users a message and expects a response. How can I ensure the conversation state changes in the callback? The following does not seem to work. def job_callback_function(context: CallbackContext): …
1
vote
2 answers

Pyrogram telegram poll : how to get the chosen option from user

I created a telegram bot that sends quiz with pyrogram, but i want to get the user's answer using a method called Poll.chosen_option and then compare it with the correct answer!! But this method returns None, Please how can i solve that and get what…
louay075
  • 21
  • 3
1
vote
0 answers

telegram bot to download the video sent by user on server (python-flask)

which telegram bot api method should I use to download the video that user sent to my bot, on the server? these are typically huge videos, more than 350MB.
Negar
  • 37
  • 8
1
vote
1 answer

Node telegram bot api - disable processing of updates sent before the bot starts

I, have this issue: when I start the bot it immediately starts looking for updates. However, in my particular case (especially during the developing) this can be very frustrating and uncomfortable. There is a way to tell the bot to process the…