{"id":18754211,"url":"https://github.com/joeyism/py-oauth2_google_login","last_synced_at":"2026-04-18T14:04:46.573Z","repository":{"id":138023758,"uuid":"121350776","full_name":"joeyism/py-oauth2_google_login","owner":"joeyism","description":"Gets OAuth2 access token from Google/YouTube automatically using requests_oauthlib","archived":false,"fork":false,"pushed_at":"2018-02-24T12:01:37.000Z","size":9,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-20T16:41:03.114Z","etag":null,"topics":["google","oauth2","oauth2-access","requests-oauthlib","webdriver","youtube"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joeyism.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-13T07:13:47.000Z","updated_at":"2021-11-22T18:40:44.000Z","dependencies_parsed_at":"2024-03-26T11:17:25.446Z","dependency_job_id":null,"html_url":"https://github.com/joeyism/py-oauth2_google_login","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/joeyism/py-oauth2_google_login","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeyism%2Fpy-oauth2_google_login","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeyism%2Fpy-oauth2_google_login/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeyism%2Fpy-oauth2_google_login/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeyism%2Fpy-oauth2_google_login/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joeyism","download_url":"https://codeload.github.com/joeyism/py-oauth2_google_login/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeyism%2Fpy-oauth2_google_login/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31971500,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["google","oauth2","oauth2-access","requests-oauthlib","webdriver","youtube"],"created_at":"2024-11-07T17:28:18.850Z","updated_at":"2026-04-18T14:04:46.550Z","avatar_url":"https://github.com/joeyism.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# oauth2_google_login\nGets OAuth2 access token from Google/YouTube automatically, using [requests_oauthlib](https://github.com/requests/requests-oauthlib)\n\nI developed this when I found that I needed to get data from Google and YouTube API automatically, but there was always the human entry for OAuth2 flow. This library takes care of that with your selected webdriver\n\n## Installation\n\n```bash\npip3 install --user oauth2_google_login\n```\n\n## Usage\n\n### With Default Chrome Webdriver\nFirst, setup Chrome Webdriver so that it is in PATH, which can be done in terminal\n\n```bash\nexport PATH=$PATH:/home/username/Downloads/chromedriver\n```\n\nThen in Python, run\n\n```python\nfrom oauth2_google_login import get_access_token\n\nauth = get_access_token(\n    email = \"user@email.com\",\n    password = \"password\",\n    client_id=\"1234567\",\n    client_secret=\"a1b2c3d4e5\",\n    scope = ['https://www.googleapis.com/auth/yt-analytics.readonly', \"https://www.googleapis.com/auth/youtube.readonly\"]\n    )\n\nauth.access_token # Facebook access token\n```\n\n### With Custom Webdriver\n\n```python\nfrom oauth2_google_login import get_access_token\nfrom selenium import webdriver\n\ndriver = webdriver.Chrome(\"/home/username/Downloads/chromedriver\")\n\nauth = get_access_token(\n    email = \"user@email.com\",\n    password = \"password\",\n    client_id=\"1234567\",\n    client_secret=\"a1b2c3d4e5\",\n    scope = ['https://www.googleapis.com/auth/yt-analytics.readonly', \"https://www.googleapis.com/auth/youtube.readonly\"],\n    driver = driver\n    )\n\nauth.access_token # Facebook access token\n```\n\n## Versions\n\n**1.0.x**\n* First Publish\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeyism%2Fpy-oauth2_google_login","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoeyism%2Fpy-oauth2_google_login","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeyism%2Fpy-oauth2_google_login/lists"}