Closed jonnjonnjo closed 2 months ago
It is correct to create multiple clients to support multiple users.
You don't need to create multiple client, just create client_details table and stored all type of client. When you hit the api just send clientId in the header or params according to your requirement and make one filter method, who will verify the clientId and then call the api.
where could i read more about the client_details table? i don't see it in https://core.telegram.org/tdlib/docs/
I planned to create a springboot application in which could hold multiple tdlib client ( because AFAIK, each client could only hold 1 acount ). this springboot will "act" as a bridge of my another application ( let's say that app is called app A ). App A could be logged in by several account. each account will send http request to my springbootapp based on according what they need ( such as sending messages, see list of chats, and etc ).
In other words, my springboot app will take many HTPP requests from many users, and do many telegram task from my app. Here's the example.
User B and C has different telegram account. The springboot could do this
all of that could be done sequencially. So, we have to create multiple clients inside the springboot app. Is that a good way to do that? or is there any other better way than that ?