R
R
Reflections2022-03-31 14:43:37
API
Reflections, 2022-03-31 14:43:37

Is it possible to access Telegram API methods through different interfaces?

Hello.

The question may sound unprofessional, I will try to state the essence.
There is a task: to create a telegram bot. The bot must communicate with the API of one organization and interact with it: pull different methods, create leads, send requests, accept payments (we separately refer to the API of the paybox payment system).

Further, the bot is laid out on an abstract server and works 24/7.

Now there is another task: to create a personal account on the landing page. This personal account should have exactly the same functionality as the telegram bot (only a different interface, because this is a website).

So the question is - what will this architecture look like in general? Is it possible that both the landing page and the bot itself use the same code hosted on the server, roughly speaking?

Is it possible to write a bot once and then use the same code (maybe slightly adapting) for different platforms? (website, Telegram client itself, perhaps further this is a desktop application)

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
Igor Markin, 2022-03-31
@Reflections

In a good way, your bot itself should not do anything. Although he can. The bot is just a client for your backend. Same as your landing page. You can create a link like this:
6245a9b9088c2658973009.jpeg

I
iBird Rose, 2022-03-31
@iiiBird

you're looking at the issue from the wrong side. you have server functionality that does something. he can do it without a bot, and without an interface. but for this functionality, you already need to file control through a bot in a telegram or through a website. both of them will contact your server through your api, which you will write.

H
HemulGM, 2022-03-31
@HemulGM

You can use the same token to run hundreds of bots. Most importantly, remember that you need to remember the update number and request it from the last one, otherwise some bots will not receive messages. And do not forget that they will all respond to messages, which means that the teams do not overlap

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question