=====
Provide REST API for authorizing telethon sessions
Add "django-telethon-authorization" to your INSTALLED_APPS setting::
INSTALLED_APPS = [ ... 'django-telethon-authorization', ]
Include django-telethon-authorization URL's in your project urls.py like this::
path('telegram-auth/', include('django_telethon_authorization.urls')),
Provide TG_SESSION_PATH
only if you use SQLite as a session backend (Telethon default)
python manage.py migrate
to create the models.TelegramAuthorization
model will be created.request.user
All endpoints accept JSON payloads.::
Usually response has status code 200
with a JSON.::
Each response contains boolean success
property which indicates if request was successfull.::
If success
== False
-> variable message
will be present inside JSON response with explanation.::
, password: }
- POST /logout/
- payload: {phone: }
Version | Tag | Published |
---|---|---|
0.2.6 | 4yrs ago | |
0.2.5 | 4yrs ago | |
0.2.4 | 4yrs ago | |
0.2.3 | 4yrs ago |