mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-21 08:16:53 +00:00
Google client secret: update to reflect current SW (#29539)
* Google client secret: update to reflect current SW - Create a reusable topic - This makes sure that the procedure is consistent across Google integrations - And only needs to be updated in one place - Apply reuse in Youtube and Google Mail integration - If this approach is accepted, the reuse can be applied in other Google integrations later * Move details into reuse topic. Add Assistant SDK
This commit is contained in:
parent
191d518378
commit
8425703272
42
source/_includes/integrations/google_client_secret.md
Normal file
42
source/_includes/integrations/google_client_secret.md
Normal file
@ -0,0 +1,42 @@
|
||||
{% capture name %}{{ include.name | default: page.title }}{% endcapture %}
|
||||
{% capture domain %}{{ include.domain | default: page.ha_domain }}{% endcapture %}
|
||||
{% capture google_dev_console_link %}{{ include.google_dev_console_link | default: page.google_dev_console_link }}{% endcapture %}
|
||||
{% capture api %}{{ include.api | default: page.api }}{% endcapture %}
|
||||
{% capture api_link %}{{ include.api_link | default: page.api_link }}{% endcapture %}
|
||||
|
||||
{% details "Generate Client ID and Client Secret" %}
|
||||
|
||||
This section explains how to generate a client ID and client secret on
|
||||
[Google Developers Console]({{ google_dev_console_link }}).
|
||||
|
||||
1. First, go to the Google Developers Console to enable [{{ api }}]({{ api_link }}).
|
||||
2. Select **Create project**, enter a project name and select **Create**.
|
||||
3. **Enable** the {{ api }} and select **Create credentials**.
|
||||
4. Navigate to **APIs & Services** (left sidebar) > [Credentials](https://console.cloud.google.com/apis/credentials).
|
||||
5. In the left sidebar, select **OAuth consent screen**.
|
||||
- Select **External** and **Create**.
|
||||
- Set the **App name** (the name of the application asking for consent) to anything you want, e.g., *Home Assistant*.
|
||||
6. You then need to select a **Support email**.
|
||||
- From the dropdown menu, select your email address.
|
||||
7. Under **Developer contact information**, enter your email address (the same as above is fine).
|
||||
8. Scroll to the bottom and select **Save and continue**.
|
||||
- You don't have to fill out anything else, or it may enable additional review.
|
||||
9. You will then be automatically taken to the **Scopes** page.
|
||||
- You do not need to add any scopes here. Select **Save and continue** to move to the **Test users** page.
|
||||
- You do not need to add anything to the **Test users** page. Select **Save and continue**, which will take you to the **Summary** page.
|
||||
- Select **Back to dashboard**.
|
||||
10. Select **OAuth consent screen** again and under **Publishing status**, select **Publish app**.
|
||||
- Otherwise your credentials will expire every 7 days.
|
||||
11. Make sure **Publishing status** is set to **In production**.
|
||||
12. In the left sidebar, select **Credentials**, then select **Create credentials** (at the top of the screen), then select **OAuth client ID**.
|
||||
13. Set the **Application type** to **Web application** and give this credential set a name (like "Home Assistant Credentials").
|
||||
14. Add `https://my.home-assistant.io/redirect/oauth` to **Authorized redirect URIs** then select **Create**.
|
||||
- This is not a placeholder. It is the URI that must be used.
|
||||
15. You will then be presented with a pop-up saying **OAuth client created**, showing **Your client ID** and **Your client secret**.
|
||||
- Make a note of these (for example, copy and paste them into a text editor), as you will need them shortly.
|
||||
- Once you have noted these strings, select **OK**.
|
||||
- If you need to find these credentials again at any point, then navigate to **APIs & Services** > **Credentials**, and you will see **Home Assistant Credentials** (or whatever you named them in the previous step) under **OAuth 2.0 Client IDs**.
|
||||
- To view both the **Client ID** and **Client secret**, select the pencil icon. This will take you to the settings page for these credentials, and the information will be on the right-hand side of the page.
|
||||
16. Congratulations! You are now the keeper of a client secret. Guard it in your treasure box.
|
||||
|
||||
{% enddetails %}
|
@ -13,6 +13,9 @@ ha_integration_type: service
|
||||
ha_platforms:
|
||||
- notify
|
||||
ha_quality_scale: platinum
|
||||
google_dev_console_link: https://console.developers.google.com/apis/api/embeddedassistant.googleapis.com/overview
|
||||
api: Google Assistant API
|
||||
api_link: https://console.developers.google.com/apis/api/embeddedassistant.googleapis.com/overview
|
||||
---
|
||||
|
||||
The Google Assistant SDK integration allows Home Assistant to interact with Google Assistant. If you want to use Google Assistant (for example, from your phone or Google Home device) to interact with your Home Assistant managed devices, then you want the [Google Assistant](/integrations/google_assistant) integration.
|
||||
@ -45,30 +48,7 @@ You need to configure developer credentials to allow Home Assistant to access yo
|
||||
These credentials are the same as the ones for [Nest](/integrations/nest) or [Google Sheets](/integrations/google_sheets).
|
||||
If you have already set up credentials, you can do step 1 and then skip to step 13 on the below instructions.
|
||||
|
||||
{% details "Generate Client ID and Client Secret" %}
|
||||
|
||||
This section explains how to generate a Client ID and Client Secret on
|
||||
[Google Developers Console](https://console.developers.google.com/apis/api/embeddedassistant.googleapis.com/overview).
|
||||
|
||||
1. First go to the Google Developers Console to enable [Google Assistant API](https://console.developers.google.com/apis/api/embeddedassistant.googleapis.com/overview)
|
||||
2. Select an existing project or create a new one from the dropdown menu in the upper left corner.
|
||||
3. Click to enable this API.
|
||||
4. Click on the field on the left of the screen, **OAuth Consent Screen**.
|
||||
5. Select **External** and **Create**.
|
||||
6. Set the _App Name_ (the name of the application asking for consent) to anything you want e.g. _Home Assistant_.
|
||||
7. You then need to select a _Support email_. To do this, simply click the drop down box and select your email address.
|
||||
8. You finally need to complete the section: _Developer contact information_. To do this, simply enter your email address (same as above is fine).
|
||||
9. Scroll to the bottom and click **Save and Continue**. Don't have to fill out anything else or it may enable additional review.
|
||||
10. You will then be automatically taken to the Scopes page. You do not need to add any scopes here so click Save and Continue to move to the Optional info page. You do not need to add anything to the Optional info page so click Save and Continue which will take you to the Summary page. Click Back to Dashboard.
|
||||
11. Click **OAuth consent screen** again and set _Publish Status_ to **Production** otherwise your credentials will expire every 7 days.
|
||||
12. Make sure **Publishing status** is set to production.
|
||||
13. Click **Credentials** in the menu on the left hand side of the screen, then click **Create credentials** (at the top of the screen), then select _OAuth client ID_.
|
||||
14. Set the Application type to _Web application_ and give this credential set a name (like "Home Assistant Credentials").
|
||||
15. Add https://my.home-assistant.io/redirect/oauth to _Authorized redirect URIs_ then click **Create**.
|
||||
16. You will then be presented with a pop-up saying _OAuth client created_ showing _Your Client ID_ and _Your Client Secret_. Make a note of these (for example, copy and paste them into a text editor) as you will need these shortly. Once you have noted these strings, click **OK**. If you need to find these credentials again at any point then simply navigate to _APIs & Services > Credentials_ and you will see _Home Assistant Credentials_ (or whatever you named them in the previous step) under _OAuth 2.0 Client IDs_. To view both the _Client ID_ and _Client secret_, click on the pencil icon, this will take you to the settings page for these credentials and the information will be on the right hand side of the page.
|
||||
17. Double check that the _Google Assistant API_ has been automatically enabled. To do this, select **Library** from the menu, then search for _Google Assistant API_. If it is enabled you will see _API Enabled_ with a green tick next to it. If it is not enabled, then enable it.
|
||||
|
||||
{% enddetails %}
|
||||
{% include integrations/google_client_secret.md %}
|
||||
|
||||
{% include integrations/config_flow.md %}
|
||||
|
||||
|
@ -13,6 +13,9 @@ ha_platforms:
|
||||
ha_codeowners:
|
||||
- '@tkdrob'
|
||||
ha_integration_type: service
|
||||
google_dev_console_link: https://console.cloud.google.com/apis/library/gmail.googleapis.com
|
||||
api: Gmail API
|
||||
api_link: https://console.cloud.google.com/apis/library/gmail.googleapis.com
|
||||
---
|
||||
|
||||
The Google Mail integration allows you to connect your [Google Mail](https://mail.google.com) to Home Assistant. The integration adds a service to allow you to set an email auto-response for when you go on vacation. A `notify` service is also added, allowing you to draft or send emails in plain text.
|
||||
@ -24,31 +27,7 @@ These credentials are the same as the ones for [Nest](/integrations/nest) and [G
|
||||
These are not the same as the one for [Google Calendar](/integrations/google).
|
||||
If you have already set up the correct credentials, you can do step 1 and then skip to step 13 on the below instructions.
|
||||
|
||||
{% details "Generate Client ID and Client Secret" %}
|
||||
|
||||
This section explains how to generate a Client ID and Client Secret on
|
||||
[Google Developers Console](https://console.cloud.google.com/apis/library/gmail.googleapis.com).
|
||||
|
||||
1. First, go to the Google Developers Console to enable [Gmail API](https://console.cloud.google.com/apis/library/gmail.googleapis.com)
|
||||
2. The wizard will ask you to choose a project to manage your application. Select a project and select **Continue**.
|
||||
3. Verify that your Gmail API was enabled and select **Go to credentials**.
|
||||
4. Navigate to **APIs & Services** (left sidebar) > [Credentials](https://console.cloud.google.com/apis/credentials)
|
||||
5. Click on the field on the left of the screen, **OAuth Consent Screen**.
|
||||
6. Select **External** and **Create**.
|
||||
7. Set the **App Name** (the name of the application asking for consent) to anything you want, e.g., *Home Assistant*.
|
||||
8. You then need to select a **Support email**. To do this, from the dropdown menu, select your email address.
|
||||
9. You finally need to complete the section: **Developer contact information**. To do this, enter your email address (the same as above is fine).
|
||||
10. Scroll to the bottom and select **Save and Continue**. You don't have to fill out anything else, or it may enable additional review.
|
||||
11. You will then be automatically taken to the **Scopes** page. You do not need to add any scopes here, so select **Save and Continue** to move to the **Optional info** page. You do not need to add anything to the **Optional info** page, so select **Save and Continue**, which will take you to the **Summary** page. Select **Back to Dashboard**.
|
||||
12. Select **OAuth consent screen** again and set *Publish Status* to **Production**. Otherwise your credentials will expire every 7 days.
|
||||
13. Make sure **Publishing status** is set to production.
|
||||
14. Select **Credentials** in the menu on the left-hand side of the screen, then select **Create credentials** (at the top of the screen), then select **OAuth client ID**.
|
||||
15. Set the Application type to *Web application* and give this credential set a name (like "Home Assistant Credentials").
|
||||
16. Add `https://my.home-assistant.io/redirect/oauth` to **Authorized redirect URIs** then select **Create**. This is not a placeholder and is the URI that must be used.
|
||||
17. You will then be presented with a pop-up saying **OAuth client created** showing **Your Client ID** and **Your Client Secret**. Make a note of these (for example, copy and paste them into a text editor), as you will need them shortly. Once you have noted these strings, select **OK**. If you need to find these credentials again at any point, then navigate to **APIs & Services** > **Credentials**, and you will see **Home Assistant Credentials** (or whatever you named them in the previous step) under **OAuth 2.0 Client IDs**. To view both the **Client ID** and **Client secret**, select the pencil icon. This will take you to the settings page for these credentials, and the information will be on the right-hand side of the page.
|
||||
18. Double-check that the **Gmail API** has been automatically enabled. To do this, select **Library** from the menu, then search for **Gmail API**. If it is enabled, you will see **API Enabled** with a green tick next to it. If it is not enabled, then enable it.
|
||||
|
||||
{% enddetails %}
|
||||
{% include integrations/google_client_secret.md %}
|
||||
|
||||
{% include integrations/config_flow.md %}
|
||||
|
||||
|
@ -13,6 +13,9 @@ ha_platforms:
|
||||
- diagnostics
|
||||
- sensor
|
||||
ha_integration_type: service
|
||||
google_dev_console_link: https://console.cloud.google.com/apis/library/youtube.googleapis.com
|
||||
api: YouTube Data API v3
|
||||
api_link: https://console.cloud.google.com/apis/library/youtube.googleapis.com?project=home-assistant-17698
|
||||
---
|
||||
|
||||
The YouTube integration allows you to connect YouTube channels to Home Assistant.
|
||||
@ -30,31 +33,7 @@ These credentials are the same as the ones for [Nest](/integrations/nest), [Goog
|
||||
These are not the same as the one for [Google Calendar](/integrations/google).
|
||||
If you have already set up the correct credentials, you can do step 1 and then skip to step 13 on the below instructions.
|
||||
|
||||
{% details "Generate Client ID and Client Secret" %}
|
||||
|
||||
This section explains how to generate a Client ID and Client Secret on
|
||||
[Google Developers Console](https://console.cloud.google.com/apis/library/youtube.googleapis.com).
|
||||
|
||||
1. First, go to the Google Developers Console to enable the [YouTube Data API v3](https://console.cloud.google.com/apis/library/youtube.googleapis.com?project=home-assistant-17698)
|
||||
2. The wizard will ask you to choose a project to manage your application. Select a project and select **Continue**.
|
||||
3. Verify that your YouTube Data API v3 was enabled and select **Go to credentials**.
|
||||
4. Navigate to **APIs & Services** (left sidebar) > [Credentials](https://console.cloud.google.com/apis/credentials)
|
||||
5. Click on the field on the left of the screen, **OAuth Consent Screen**.
|
||||
6. Select **External** and **Create**.
|
||||
7. Set the **App Name** (the name of the application asking for consent) to anything you want, e.g., *Home Assistant*.
|
||||
8. You then need to select a **Support email**. To do this, from the dropdown menu, select your email address.
|
||||
9. You finally need to complete the section: **Developer contact information**. To do this, enter your email address (the same as above is fine).
|
||||
10. Scroll to the bottom and select **Save and Continue**. You don't have to fill out anything else, or it may enable additional review.
|
||||
11. You will then be automatically taken to the **Scopes** page. You do not need to add any scopes here, so select **Save and Continue** to move to the **Optional info** page. You do not need to add anything to the **Optional info** page, so select **Save and Continue**, which will take you to the **Summary** page. Select **Back to Dashboard**.
|
||||
12. Select **OAuth consent screen** again and set *Publish Status* to **Production**. Otherwise your credentials will expire every 7 days.
|
||||
13. Make sure **Publishing status** is set to production.
|
||||
14. Select **Credentials** in the menu on the left-hand side of the screen, then select **Create credentials** (at the top of the screen), then select **OAuth client ID**.
|
||||
15. Set the Application type to **Web application** and give this credential set a name (like "Home Assistant Credentials").
|
||||
16. Add `https://my.home-assistant.io/redirect/oauth` to **Authorized redirect URIs** then select **Create**. This is not a placeholder and is the URI that must be used.
|
||||
17. You will then be presented with a pop-up saying **OAuth client created** showing **Your Client ID** and **Your Client Secret**. Make a note of these (for example, copy and paste them into a text editor), as you will need them shortly. Once you have noted these strings, select **OK**. If you need to find these credentials again at any point, then navigate to **APIs & Services** > **Credentials**, and you will see **Home Assistant Credentials** (or whatever you named them in the previous step) under **OAuth 2.0 Client IDs**. To view both the **Client ID** and **Client secret**, select the pencil icon. This will take you to the settings page for these credentials, and the information will be on the right-hand side of the page.
|
||||
18. Double-check that the **YouTube Data API v3** has been automatically enabled. To do this, select **Library** from the menu, then search for **YouTube Data API v3**. If it is enabled, you will see **API Enabled** with a green tick next to it. If it is not enabled, then enable it.
|
||||
|
||||
{% enddetails %}
|
||||
{% include integrations/google_client_secret.md %}
|
||||
|
||||
{% include integrations/config_flow.md %}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user