Simon H
Simon H

Reputation: 21027

Can the telegram auth SDK be used within a browser

I'm struggling to get my head around the basics, and to find somewhere to ask for help. I know that the first two questions are a bit wooly by Stack overflow standards.

I'm seeing a bunch of errors but some of them seem to do with using webpack 4, but I'm not sure if what I want to do is even possible (see Accessing Telegram API via web-based client), although I have now mananged to get a 2FA code sent

My aim is to create a client that can log into certain telegram channels where all the content comes from a bot, and to parse information from them

Upvotes: 5

Views: 884

Answers (1)

Roj
Roj

Reputation: 1352

Connecting to the Telegram MTProto API is possible in browsers. You should use a library to do that. I'm going to mention some functional and maintained libraries.

There is the official TDLib with browser support, but it is quite hard for newcomers to use.

There is also GramJS which works on both Node.js and browsers, has type declarations for TypeScript and an easy-to-use API. It also take cares of many things like caching entities, so you do your work even faster. You can even change the lib target to use as an ES module in the browser.

is there a forum/channel somewhere for a dialog with people trying to use MTProto?

You can consider joining @gramjschat.

Upvotes: 1

Related Questions