xtrime-ru / TelegramApiServer

Fast, simple, async php telegram api server: MadelineProto + Amp HTTP Server
https://tg.i-c-a.su
MIT License
576 stars 130 forks source link

Running one instance and logging in using multiple phone numbers #107

Closed reza305z closed 1 year ago

reza305z commented 2 years ago

Hi! Consider I have a mobile application that logs users in using Telegram authentication API and helps them manage their channels. Is it possible that I run one instance of TelegramApiServer with one API Id and API hash in a container (using docker compose) and use this single instance to authenticate my app's users and manage their channels? Or I need to run one instance for each user?

Assuming that I run my app (using Laravel) in a separate container.

I have searched a lot, almost for days and still confused about it; So any help is appreciated.

xtrime-ru commented 1 year ago

API id and API hash is same for all instances. You can authenticate multiple users in one instance of TelegramApiServer. But if any account will fail (get ban or session is removed from another devices) then whole instance will fail. So you got all eggs in one basket.