cjongseok / mtproto

Telegram MTProto and its proxy (over gRPC) in Go (golang). API Layer: 71
Apache License 2.0
151 stars 20 forks source link

add auth via bot token #17

Open vtolstov opened 5 years ago

vtolstov commented 5 years ago

I want to use this via bot token and so need ability to auth not only by phone, but with bot token.

cjongseok commented 5 years ago

@vtolstov Thanks for your interest in this project. As far as I know, Telegram Bot is quite different with general users. I think Bot account would only work with Bot API.

vtolstov commented 5 years ago

I have bot account and don't want to auth by my phone and code, but want to auth bot via provided bot secret

cjongseok commented 5 years ago

I am not sure Telegram would allow bot account to auth to Telegram API, and this project implements Telegram API. That is, each account can only authenticate to its API, respectively.

phone -> Telegram API
bot -> Bot API

And bot -> Telegram API is not allowed as far as I know.

vtolstov commented 5 years ago

https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1check_authentication_bot_token.html

cjongseok commented 5 years ago

@vtolstov interesting. Bot can auth to Telegram API! Thanks for the good information. It seems auth.importBotAuthorization() can handle that. As you know open source projects are open to contributions, and so it is. If you can participate in the project for the feature you suggested, it would be nice :). Because I am so busy theses days for building up my startup from the scratch. So I am not sure I can make time for the feature.