mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 15:26:59 +00:00
Update google calendar instructions to recommend Web Auth (#29792)
* Update google calendar instructions to recommend Web Auth * Update source/_integrations/google.markdown Co-authored-by: Martin Hjelmare <marhje52@gmail.com> --------- Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
parent
7df1211ad0
commit
b6dc520ae1
@ -19,65 +19,16 @@ The *Google Calendar* integration allows you to connect your [Google Calendar](h
|
||||
|
||||
## Prerequisites
|
||||
|
||||
You need to configure developer credentials to allow Home Assistant to access your Google Account.
|
||||
You need to configure developer credentials to allow Home Assistant to access your Google Account. The current recommended approach is to create *Web Auth* credentials for Google Calendar since
|
||||
the same credentials work for all Google integrations. Previously, this integration only supported
|
||||
*Device Auth* and those credentials are no longer recommended. You can continue to use *Device Auth*
|
||||
credentials but they will only work with Google Calendar.
|
||||
|
||||
{% 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/start/api?id=calendar).
|
||||
|
||||
1. First go to the [Google Developers Console](https://console.developers.google.com/start/api?id=calendar).
|
||||
2. The wizard will ask you to choose a project to manage your application. Select a project and click continue.
|
||||
3. Verify that your calendar API was enabled and click '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, simply click the drop down box and select your email address.
|
||||
9. You finally need to complete the section: *Developer contact information*. To do this, simply enter your email address (same as above is fine).
|
||||
10. Scroll to the bottom and click **Save and Continue**. 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 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.
|
||||
12. Click **OAuth consent screen** again and set *Publish Status* to **Production** otherwise your credentials will expire every 7 days.
|
||||
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 *TV and Limited Input* and give this credential set a name (like "Home Assistant Credentials") then click **Create**.
|
||||
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 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.
|
||||
16. You must also enable the *Google Calendar API*. To do this, select **Library** from the menu, then search for *Google Calendar 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 %}
|
||||
|
||||
The integration setup will next give you instructions to enter the [Application Credentials](/integrations/application_credentials/) (OAuth Client ID and Client Secret) and authorize Home Assistant to access your account and Calendars.
|
||||
|
||||
{% details "OAuth and Device Authorization steps" %}
|
||||
|
||||
1. The first step shows a link and a code.
|
||||
|
||||

|
||||
|
||||
2. Click on the link [https://www.google.com/device](https://www.google.com/device) to open a Google website which should open a new window where you can enter the code.
|
||||
|
||||
3. Home Assistant will wait for a short time while you complete the authorization steps, checking in the background for the authorization to be completed.
|
||||
|
||||

|
||||
|
||||
4. Continue through the steps of selecting the account you used when creating the credentials in the Google Developer Console.
|
||||
|
||||
5. **NOTE**: You may get a message telling you that the app has not been verified and you will need to acknowledge that in
|
||||
order to proceed.
|
||||
|
||||
6. Depending on your `configuration.yaml`, you will either be granting Home Assistant *read only* or *read write* access
|
||||
to all the Google Calendars available to your linked account.
|
||||
|
||||
7. You should then see a *Success!* message from Google.
|
||||
|
||||

|
||||
|
||||
8. You may close the window, and return back to Home Assistant where you should see a *Success!* message from Home Assistant.
|
||||
|
||||

|
||||
|
||||
{% enddetails %}
|
||||
{% include integrations/google_oauth.md %}
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
|
@ -24,7 +24,7 @@ The Google Mail integration allows you to connect your [Google Mail](https://mai
|
||||
|
||||
You need to configure developer credentials to allow Home Assistant to access your Google Account.
|
||||
These credentials are the same as the ones for [Nest](/integrations/nest) and [Google Sheets](/integrations/google_sheets) and [YouTube](/integrations/youtube).
|
||||
These are not the same as the one for [Google Calendar](/integrations/google).
|
||||
These are not the same as *Device Auth* credentials previously recommended for [Google Calendar](/integrations/google).
|
||||
|
||||
{% include integrations/google_client_secret.md %}
|
||||
|
||||
|
@ -26,7 +26,8 @@ The integration currently only has access to that one document that is created d
|
||||
|
||||
You need to configure developer credentials to allow Home Assistant to access your Google Account.
|
||||
These credentials are the same as the ones for [Nest](/integrations/nest), [YouTube](/integrations/youtube), and [Google Mail](/integrations/google_mail).
|
||||
These are not the same as the one for [Google Calendar](/integrations/google).
|
||||
These are not the same as *Device Auth* credentials previously recommended for [Google Calendar](/integrations/google).
|
||||
|
||||
|
||||
{% include integrations/google_client_secret.md %}
|
||||
|
||||
|
@ -21,7 +21,8 @@ each task list, allowing you to create, update, or delete items on the list from
|
||||
|
||||
You need to configure developer credentials to allow Home Assistant to access your Google Account.
|
||||
These credentials are the same as the ones for [Nest](/integrations/nest) and [Google Mail](/integrations/google_mail).
|
||||
These are not the same as the one for [Google Calendar](/integrations/google).
|
||||
These are not the same as *Device Auth* credentials previously recommended 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" %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user