How do I use Telegram API without a bot?
Asked Answered
C

2

11

I don't need a reply bot.
I want to just make a read-only call to read the channel history. Probably I need †he method https://core.telegram.org/method/messages.getHistory but documentation https://core.telegram.org/api#getting-started does not even explain the protocol.
The protocol as I understand is pretty custom and I should use some minimal wrapper but all examples/articles I've managed to find link to https://github.com/atipugin/telegram-bot-ruby but I don't need a bot.

Claxton answered 23/3, 2018 at 13:12 Comment(2)
Maybe you want to integrate the CLI github.com/vysheng/tgDisconcerted
@davidbaumann, dependencies: Lua, Python. And the last commit is 2 years old -- I don't see any mention of "supergroup" in that README. Willing to export supergroup history was my goal.Claxton
A
13

To use Telegram without a bot you should work with Telegram low-level protocol MTProto. There are MTProto libraries for Python, JavaScript and even for PHP. See examples of getting chat history with those libraries here, here and here

But it seems that there is no Ruby gem for this - bad luck, you should either create MTProto Ruby gem yourself, either move this functional to another service written in language that has MTProto library.

Athalee answered 30/3, 2018 at 21:11 Comment(0)
L
0

You can use tdlib-ruby

gem 'tdlib-ruby'
Lingulate answered 12/8, 2022 at 11:22 Comment(1)
It does not work. The README example just stucks in a loop asking for phone number. And those who managed to not have the issue earlier seem to have other issues due to the dry-rb dependency.Claxton

© 2022 - 2024 — McMap. All rights reserved.