{"id":16479703,"url":"https://github.com/ismarslomic/google-assistant-oauth","last_synced_at":"2025-10-27T16:31:45.232Z","repository":{"id":58598237,"uuid":"481144927","full_name":"ismarslomic/google-assistant-oauth","owner":"ismarslomic","description":"Simple utility for retrieving OAuth 2.0 tokens for access to Google Assistant SDK","archived":false,"fork":false,"pushed_at":"2022-09-08T16:44:34.000Z","size":29,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-02-01T07:05:20.875Z","etag":null,"topics":["google","google-assistant-sdk","oauth","oauth2"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ismarslomic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-04-13T09:03:47.000Z","updated_at":"2023-07-17T15:00:00.000Z","dependencies_parsed_at":"2022-09-06T11:11:59.706Z","dependency_job_id":null,"html_url":"https://github.com/ismarslomic/google-assistant-oauth","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ismarslomic%2Fgoogle-assistant-oauth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ismarslomic%2Fgoogle-assistant-oauth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ismarslomic%2Fgoogle-assistant-oauth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ismarslomic%2Fgoogle-assistant-oauth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ismarslomic","download_url":"https://codeload.github.com/ismarslomic/google-assistant-oauth/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238526975,"owners_count":19487138,"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":["google","google-assistant-sdk","oauth","oauth2"],"created_at":"2024-10-11T12:52:42.647Z","updated_at":"2025-10-27T16:31:44.882Z","avatar_url":"https://github.com/ismarslomic.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# google-assistant-oauth\n\n[![Docker Image CI](https://github.com/ismarslomic/google-assistant-oauth/actions/workflows/docker-image.yml/badge.svg?branch=main)](https://github.com/ismarslomic/google-assistant-oauth/actions/workflows/docker-image.yml)\n\u003e Simple utility wrapped in Docker image for retrieving the OAuth 2.0 tokens for access to\n\u003e [Google Assistant Service](https://developers.google.com/assistant/sdk/overview#google_assistant_service).\n\n## Get support\n\nBugs and questions related to the source code and Docker image can be reported at\n[Github Issues](https://github.com/ismarslomic/google-assistant-oauth/issues) in the\n[ismarslomic/google-assistant-oauth](https://github.com/ismarslomic/google-assistant-oauth) repo.\n\n\n## About\n\nIn order to access the\n[Google Assistant Service](https://developers.google.com/assistant/sdk/overview#google_assistant_service)\nyou need to retrieve access and refresh tokens by using Google OAuth2 implementation, this is\nexplained in\n[Google Authorization and Authentication documentation](https://developers.google.com/identity/protocols/oauth2/openid-connect)\n.\n\nThis utility simplifies going through the OAuth2 flow and was created in the context of implementing\nembedded Google Assistant for broadcasting message to Google Assistant enabled speakers,\nsee [ismarslomic/google-assistant-broadcast](https://github.com/ismarslomic/google-assistant-broadcast)\n.\n\n## Setup\n\n### Prerequisites\n\n- **docker** - you need to have Docker installed on your machine,\n  read [Get Docker](https://docs.docker.com/get-docker/) for more information.\n- **Google OAuth 2.0 Client ID** - in order to authenticate yourself and get access to your Google\n  Assistant.\n    - Follow steps **1-5**\n      in [Configure an Actions Console project](https://developers.google.com/assistant/sdk/guides/service/python/embed/config-dev-project-and-account)\n    - Make sure that you choose **\"Device registration\"** when creating new project in **Actions\n      Console**\n    - **!Important!** Download the OAuth Client file from GCP Console / API \u0026 Services / Credentials page (not from Google Actions Console), read solution on issue [#7](https://github.com/ismarslomic/google-assistant-broadcast/issues/7#issuecomment-1151601639). Make also sure that the `Application type` of the OAuth Client is `Desktop`\n    - Rename the downloaded file **from** `client_secret_****.apps.googleusercontent.com.json` **to** `client_secret.json`\n\n### Run docker container with `docker run`\nReplace `/home/pi/config` with full path to the folder where your `client_secret.json` file is\nlocated.\n\n\u003e **Warning**\n\u003e To avoid write permission issues inside container, please use a folder with ownership of the OS user you are logged in with. Typically `/home/pi` on RPI or `/home/ubuntu` on Ubuntu.\n\nWhen docker container is terminated and the OAuth2 flow finished, you will find `tokens.json`\nfile produced in the same folder.\n\n```bash\ndocker run --rm \\\n-p 3005:3005 \\\n-v /home/pi/config:/usr/src/config \\\nismarslomic/google-assistant-oauth:latest\n```\n\nClick on the URL provided in the console output from the Docker container.\n\n#### Example of expected `client_secret.json` file\n```json\n{\n  \"installed\": {\n    \"client_id\": \"****.apps.googleusercontent.com\",\n    \"project_id\": \"you-project-id\",\n    \"auth_uri\": \"https://accounts.google.com/o/oauth2/auth\",\n    \"token_uri\": \"https://oauth2.googleapis.com/token\",\n    \"auth_provider_x509_cert_url\": \"https://www.googleapis.com/oauth2/v1/certs\",\n    \"client_secret\": \"****\",\n    \"redirect_uris\": [\n      \"http://localhost\"\n    ]\n  }\n}\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fismarslomic%2Fgoogle-assistant-oauth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fismarslomic%2Fgoogle-assistant-oauth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fismarslomic%2Fgoogle-assistant-oauth/lists"}