1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2024-12-13 14:00:25 +00:00
mycorrhiza/help/en/telegram.myco

41 lines
2.1 KiB
Plaintext
Raw Normal View History

2021-11-30 17:58:03 +00:00
= Telegram authorization
2021-07-24 19:44:01 +00:00
//This article is intended for wiki administrators.//
If you want, you can let users log in to your wiki using **Telegram**.
Telegram is a proprietary messaging application used by half a billion people. Learn more at [[https://telegram.org]].
2021-11-30 17:58:03 +00:00
== Setting up Telegram integration
2021-07-24 19:44:01 +00:00
In order to enable Telegram authorization, you need to create a Telegram bot and link it with your wiki.
2021-11-30 17:58:03 +00:00
=== Creating a bot
2021-07-24 19:44:01 +00:00
Open the chat with [[https://t.me/botfather | @BotFather]], the bot for creating other bots. Create a new bot there. You will need the bot username and token later. You can set the bot's userpic. It would be great if it matches your wiki's logo.
After creating the bot, send the `/setdomain` command and then send your wiki's domain.
You do not need to actually //host// the bot. It is enough for it just to be created in BotFather. You can also reuse a previously existing bot.
2021-11-30 17:58:03 +00:00
=== Configuring
2021-07-24 19:44:01 +00:00
In `config.ini`, in `[Telegram]` section, fill in the bot's username (without @) and token:
```
[Telegram]
TelegramBotName = your_bot
TelegramBotToken = 0000000000:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
```
Reload the wiki.
If both fields are both set, the engine will enable Telegram authorization.
2021-11-30 17:58:03 +00:00
== Using
2021-07-24 19:44:01 +00:00
On login and register pages there is a blue button. If a user clicks it, they are prompted to give the authorization permission to your bot. The user's @username will be used as wiki username. Telegram users are part of the //editor// user group by default. Telegram users can use the wiki just like everyone else.
2021-11-30 17:58:03 +00:00
== Limitations
2021-09-06 17:46:34 +00:00
* You should host your wiki using a public IP or domain name. Private-hosted (i.e. localhost or LAN) wikis are not supported, obviously.
2021-07-24 19:44:01 +00:00
* Telegram does not support HTTP wikis, you //must// use HTTPS.
** One way of setting up HTTPS is using [[https://certbot.eff.org | certbot]] and a reverse proxy such as [[https://nginx.org | nginx]].
* Telegram users without @username cannot authorize.
* Telegram users with usernames that are already taken on the wiki cannot authorize.
* Overall, this is an experimental feature. Use on your own risk.