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
10
votes
4 answers

Telegram Bot custom keyboard in C#

I tried to create message with custom keyboard. So I send request with reply_markup = {"keyboard":[["1"],["2"]],"resize_keyboard":"True","one_time_keyboard":"True"} But, it does not work. I tried all of…
Grisha
  • 99
  • 1
  • 1
  • 4
10
votes
2 answers

Send message to phone number not @username using Telegram Bot

Is this possible to send message to phone number not @username using telegram bot? If answer is No, I have to say I have telegram account without @username and several days ago I got message from a Bot, how this is possible? Any advice will be…
Saber Amani
  • 6,409
  • 12
  • 53
  • 88
10
votes
1 answer

How to send position using Telegram Desktop?

I'm trying to move my first steps in Telegram, so sorry for the entry-level question. I'm trying to use some simple Bot that I'd like to replicate and then evolve them: testing these bots from Telegram Desktop on my pc (Win7), I should send my…
Cesare
  • 1,629
  • 9
  • 30
  • 72
10
votes
2 answers

How to programmatically check if a cell phone number is registered in the Telegram?

I was wondering about what is the best way to know if a cell phone number has registered to the Telegram messenger or not? Thanks.
Adel
  • 3,542
  • 8
  • 30
  • 31
10
votes
7 answers

Telegram BOT Api: how to send a photo using PHP?

The sendPhoto command require an argument photo defined as InputFile or String. The API doc tells: Photo to send. You can either pass a file_id as String to resend a photo that is already on the Telegram servers, or upload a new photo…
realtebo
  • 23,922
  • 37
  • 112
  • 189
9
votes
3 answers

how can I add menu button in telegram bot

how can I add Menu button in telegram bot using telegraf menu button like this
Miloud Mokkedem
  • 432
  • 1
  • 5
  • 14
9
votes
4 answers

error_code":403,"description":"Forbidden: bot was blocked by the user. error handle in python

I have a problem using telebot API in python. If the user sends a message to the bot and waits for the response and at the same time he blocks the bot. I get this error and the bot will not respond for other users: 403,"description":"Forbidden: bot…
Ehsan
  • 517
  • 1
  • 7
  • 32
9
votes
2 answers

How to make Python-Telegram_bot send a message without getting a commad?

I'm Making a telegram bot using Python-Telegram-bot. I wanna make it send a message to one specific user (myself in this case) to select an option. after that, it should take that option as a command and work as usual. but after 30 min... it should…
M MO
  • 323
  • 4
  • 16
9
votes
2 answers

How can I receive file in python-telegram-bot?

I have a problem about file messages in python telegram bot. How can I receive file and read that file ? Or save it.
DR8002
  • 113
  • 1
  • 1
  • 7
9
votes
2 answers

Python Telegram Bot Markdown

I am working on a Telegram Bot in Python but I struggle to use markdown correctly and I can not find any proper resources about the telegram markdown implementation. It gets even more complicated because of two different markdown "versions"…
Schneyer
  • 1,197
  • 1
  • 9
  • 27
9
votes
2 answers

How can I create a pop-up notification in Telegram bot?

I´m developing a telegram bot in c#. Using the class TelegramBotClient in Telegram.Bot library. I want to create a pop-up notification after click on a InlineKeyboardButton. Does anyone know how to do it? Thank you very much. I want to create…
David Con
  • 422
  • 3
  • 5
  • 15
9
votes
3 answers

how to convert jpg to webp in C#

I'm writing a telegram bot that takes jpg from it's users and sends it back as stickers. I did this correctly by downloading jpg, change the extension of file to png and upload and send it back as a sticker message to the user. as shown below: var…
Persian LionKing
  • 304
  • 1
  • 5
  • 19
9
votes
1 answer

Send multiple images telegram bot api

Is it possible to send multiple images in 1 message using telegram bot api, php? I know about method sendPhoto().
Bipa
  • 271
  • 1
  • 3
  • 10
9
votes
1 answer

Telegram bot api: sendPhoto do not render html

I'm composing messages in this way const reply_telegram = { "chat_id" : MIRKO, "photo" : row.image_url, "caption" : 'Wow', "parse_mode" : "HTML", …
realtebo
  • 23,922
  • 37
  • 112
  • 189
9
votes
1 answer

telegram inline bot - InlineQueryResultCachedPhoto does not show title and description

I'm using telegram bot api for implementing an inline bot. For sending query result to the user, I'm using answerInlineQuery method in this way. This is just an example for showing a photo that exist on telegram server to user: $results = array( …
hamed
  • 7,939
  • 15
  • 60
  • 114