{"id":15576254,"url":"https://github.com/parikls/django-telethon-authorization","last_synced_at":"2025-04-09T17:44:08.500Z","repository":{"id":57422332,"uuid":"137371410","full_name":"parikls/django-telethon-authorization","owner":"parikls","description":"django extension which uses telethon to integrate telegram client authorization (phone+code) to your project","archived":false,"fork":false,"pushed_at":"2021-04-15T12:07:52.000Z","size":18,"stargazers_count":11,"open_issues_count":0,"forks_count":4,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-05T11:06:08.391Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/parikls.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-14T14:48:50.000Z","updated_at":"2025-03-14T14:56:57.000Z","dependencies_parsed_at":"2022-09-13T14:13:02.123Z","dependency_job_id":null,"html_url":"https://github.com/parikls/django-telethon-authorization","commit_stats":null,"previous_names":["porovozls/django-telethon-authorization"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parikls%2Fdjango-telethon-authorization","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parikls%2Fdjango-telethon-authorization/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parikls%2Fdjango-telethon-authorization/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parikls%2Fdjango-telethon-authorization/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/parikls","download_url":"https://codeload.github.com/parikls/django-telethon-authorization/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248080316,"owners_count":21044481,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-02T18:44:29.070Z","updated_at":"2025-04-09T17:44:08.470Z","avatar_url":"https://github.com/parikls.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Project is no longer maintaned.\n===============================\n\n=====\nDjango Telethon Authorization\n=====\n\nProvide REST API for authorizing telethon sessions\n\nQuick start\n-----------\n\n1. Add \"django-telethon-authorization\" to your INSTALLED_APPS setting::\n\n    INSTALLED_APPS = [\n        ...\n        'django_telethon_authorization',\n    ]\n\n2. Include django-telethon-authorization URL's in your project urls.py like this::\n\n    path('telegram-auth/', include('django_telethon_authorization.urls')),\n\n\n3. Add environment variables::\n\n* TG_API_ID = 111111\n* TG_API_HASH = api_hash\n* TG_SESSION_PATH = /path/to/sessions\n\nProvide `TG_SESSION_PATH` only if you use SQLite as a session backend (Telethon default)\n\n4. Run `python manage.py migrate` to create the  models.\n\nWay of work\n------------\n\n- When you request a telegram code - `TelegramAuthorization` model will be created.\n- It will be automatically linked to `request.user`\n\nEndpoints\n------------\n\nAll endpoints accept JSON payloads.::\nUsually response has status code `200` with a JSON.::\nEach response contains boolean `success` property which indicates if request was successfull.::\nIf `success` == `False` -\u003e variable `message` will be present inside JSON response with explanation.::\n\n\n* POST /request_code/\n* payload: {phone: \u003cphone\u003e}\n* POST /submit/\n* payload: {phone: \u003cphone\u003e, code: \u003ccode\u003e, password: \u003cpassword\u003e}\n* POST /logout/\n* payload: {phone: \u003cphone\u003e}\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparikls%2Fdjango-telethon-authorization","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparikls%2Fdjango-telethon-authorization","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparikls%2Fdjango-telethon-authorization/lists"}