
INSTALLED_APPS = Ī good advise is to structure bot’s credentials within settings.py file. $ pip install django-telegram-loginĪdd the application to the installed apps in the settings of the project. Install the package via pip with the following command. In the future, the bot’s token and username will be needed for the development and a verification (received Telegram user data). Run the server to make sure you can reach your local website via the tunnel. You can share it with anybody on the Internet and he/she will get access to your website on localhost - actually what is needed for the Telegram. $ lt -port 8000Īs a result, you will get a random URL like. Then, run the localtunnel tool with a port which you are going to use with the manager’s runserver command.

Install the localtunnel package via the npm (install it as well, in case if you do not have it). This is a small problem in local development. The widget does not get any HTTP responses for the developer but Telegram sends requests to your web address on its own. localtunnelįirst of all, Telegram requires a domain of your website.

Make sure you are familiar enough with the subject and have read the Telegram news and the widget documentation. The article is full of illustration, pictures and examples. Also, it was tested with Django 1.11 and Django 2.0 successfully. The django-telegram-login works with both versions of Python. The following article consists of introduction to the Telegram login, explanation on how the django-telegram-login works and how to pal up these two things. I have created the reusable Django application called django-telegram-login to make implementation of Telegram login as much comfortable and fast as possible. The widget looks like a button which developer can configure easily: callback or redirect system of receiving user data, size of a button, a corner radius of button and user’s avatar near a button.

From now user has a possibility to provide his own data from his Telegram account instead of default registration. A few days ago Telegram has presented a login widget for external websites.
