Questions tagged [telegram-api]

The API for the Telegram messaging service. More information on the API and the TDLib library (for the AP available for multiple programming languages), can be found at .

237 questions
1
vote
2 answers

Telegram API (NOT Telegram Bot API!) - how to get all messages in entire chat/channel?

I need to grab all messages in a chat. I use C# and the TLSharp library. I authrized, got the token etc. successfully. But when I'm trying to get the messages in a loop, I'm going to an infinite loop. So the text with the results is never…
serhiy1994
  • 59
  • 8
1
vote
1 answer

How to send '#' to chat with Telegram bot API?

I'm trying to send a text for example "Hello # World" with Telegram API with this url: https://api.telegram.org/bot'token'/sendMessage?chat_id='chatid'&text=Hello+#+World But I just receive Hello I also tried to encode it like…
J--
  • 67
  • 4
1
vote
0 answers

How can I get/write info about/in comments to telegram channel?

Is there a way to get information (ids, etc) about comments inside a channel post in telegram from telegram API ? Or is there an API method to write to the post comments? Could you provide some examples if this is possible? Thanks
1
vote
4 answers

Get telegram group ID

At first i should emphasis that this is a question about telegram GROUP NOT CHANNEL.I need to get group id to send message via telgram api. I have review this link . using @rawDataBot needs to add bot to group, that is not possible most of the…
alex
  • 7,551
  • 13
  • 48
  • 80
1
vote
0 answers

Telegram Bots with privacy set to disabled should be able to read the last 100 messages from a group - how to implement that in my bot?

So, I have a bot and set Privacy to disabled from @botfather, therefore the bot can access the group's messages. When I try to add it to groups, Telegram sends me a notification that the bot, once added to the group, will be able to access the last…
1
vote
0 answers

Not receiving updates when InlineKeyboard button is pressed

I made a Telegram Bot using pure PHP (a class of mine) for adding Inline Keyboard to channel posts. When you press the button it changes the counter on it. Webhook is set. I receive the channel_post update, call editMessageReplyMarkup and inline…
Dei
  • 11
  • 3
1
vote
1 answer

How to leave private group on telegram with Python

The following code is for joining a group on telegram: from telethon.sync import TelegramClient from telethon import functions, types with TelegramClient(name, api_id, api_hash) as client: result =…
1
vote
1 answer

Telegram: Can a bot write a message to a specific user in a group?

I have a telegram group with several human members and a bot. This bot sends regular status updates to the group. I do this with a simple curl command. https://api.telegram.org/bot/sendMessage?chat_id==&text=hello%20world Is…
Stackuser
  • 11
  • 2
1
vote
1 answer

Telegraf.js pass data from button to a function that handle a WizardScene

I need to pass some data retrieved from a Database. When i click into a button i send a private message to the user who have cliecked. I need to pass some datas from that button, to the message sent. Because, into that message i have an other button…
Matt
  • 127
  • 1
  • 13
1
vote
1 answer

Telegraf.js add buttons with markup on sendPhoto

I've a bot.telegram.sendPhoto() with this code: bot.telegram.sendPhoto( channel_id, {source: filepath}, { caption: description.join("\n"), parse_mode: 'MarkdownV2' } ) (description is an array with some text. So i would to add…
Mattia
  • 199
  • 1
  • 1
  • 12
1
vote
1 answer

Python telebot. How send messages if user don't do anything?

I'm new in telegram bot building, the problem is, how is possible to send a message to the user if he does nothing for 12 hours, then send another one if he continues to do nothing? But if he clicks on the button in the message 4 for example, it…
1
vote
2 answers

Telegram: Sen photo into a message without showing the photo link with Telegraf (NodeJs)

I'm on a channel that sends messages that contains a text, with a link (that link has not an image) and an image (tip product from amazon): I tried with this code and it's similar: bot.telegram.sendMessage('mychannel', `Hello…
Mattia
  • 199
  • 1
  • 1
  • 12
1
vote
0 answers

How to get profile photos from my telegram channels?

I'm trying to make a correct request to Telegram API. Code: api.call('upload.getFile', { flags: 0, precise: false, cdn_supported:true, location: { _: 'inputPeerPhotoFileLocation', flags: 0, big: true, peer:{ …
1
vote
1 answer

Telegram API: Can I get historical user data for a channel?

You can query the Telegram API for the current number of members in a Telegram channel. But is it possible to query for the number of members on past dates? Ideally, I would like to know the number of members on every day for the last year: | Date …
Elias Strehle
  • 1,722
  • 1
  • 21
  • 34
1
vote
0 answers

Simple Telegram client that read new channel messages that I'm Subscribed?

I need to read all new messages of one specific channel that I'm in (not as an admin but I,m Subscribed). I need to do this by C++. My OS is Ubuntu 20.04 Server. I Install TDlib by the following Commands : apt-get update apt-get upgrade apt-get…
Parsika
  • 79
  • 5