Skip to content

Multiple sessions support

Compare
Choose a tag to compare
@xtrime-ru xtrime-ru released this 11 Jan 21:02
· 431 commits to master since this release

Now TelegramApiServer supports MadelineProto CombinedAPI.

You can use one server instance to access multiple MadelineProto sessions via one port. Start server with multiple --session options and add to every request 'session' parameter to specify, which session to use for command execution.

If you running server with one session (default mode) no additional parameters needed.

Examples:
php server.php --session=user1 --session=bot --session=user2

http://127.0.0.1:9503/api/getSelf/?session=user1
http://127.0.0.1:9503/api/getSelf/?session=bot
http://127.0.0.1:9503/api/getInfo/?id=@xtrime&session=user2
http://127.0.0.1:9503/api/getHistory?data[peer]=@breakingmash&session= user1