How to use Telegram's TDlib with Node.js
Asked Answered
I

3

6

There is TDlib which allows to work with Telegram Client API.

Documentation says that it's possible to use it with almost any language.

I can't imagine myself how I can use it with Node.js

Could you tell me where to start from or provide me with a sample code?

Impost answered 17/8, 2018 at 17:30 Comment(3)
github.com/k-egor-smirnov/node-tg-nativeGuadalcanal
@Guadalcanal seems that I had to google more. Thank you!Impost
I will add an answer for the sake of the question being replied.Guadalcanal
G
2

You can probably port one of the examples on their GitHub repos (Python can be an easy one). You needs to learn how to use binary modules with node.

Or you can check one of the 3rd party libraries (eg. https://github.com/k-egor-smirnov/node-tg-native)

Guadalcanal answered 18/8, 2018 at 19:29 Comment(0)
Z
5

You can make requests and get updates using td_json_client and node-ffi interfaces. Official repository provides a simple example.

If you don't want to create API client from zero, you may use one of exists. For example, check out Airgram. This is a strong typed tdlib client for NodeJS.

Zakarias answered 27/4, 2019 at 8:41 Comment(0)
G
2

You can probably port one of the examples on their GitHub repos (Python can be an easy one). You needs to learn how to use binary modules with node.

Or you can check one of the 3rd party libraries (eg. https://github.com/k-egor-smirnov/node-tg-native)

Guadalcanal answered 18/8, 2018 at 19:29 Comment(0)
V
2

There are 2 active TDLib wrappers in Node.js:

Both require you to build the TDLib binary yourself before using these wrapper: https://tdlib.github.io/td/build.html

Vair answered 15/6, 2021 at 15:33 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.