The Google Calendar Pro add-on for Simple Calendar uses OAuth to connect securely to Google. In turn this allows access to both private and public calendars and additional display features such as event colors, attendees and attachments.
Don’t have the add-on yet? Get the Google Calendar Pro add-on here.
Setting up an Google OAuth client is almost as easy as obtaining a Google API key as used by the default settings in the core Simple Calendar plugin.
Here are step-by-step instructions to configure a Google OAuth client for Google Calendar Pro:
1 Navigate to the Google Developers Console.
2 If you’ve already created an app for the simple Google API key method, you can use this app for a Google OAuth client also. If so, skip to step 5.
If you haven’t, from the top Project menu select Create project. Give your project a name, agree to the terms, then click Create.
3 From the Google Developers Console Dashboard select Enable API. If you don’t see this, select API Manager from the top-left “hamburger” menu. If you already have a project created in the Google console using the original method, you can skip to step 5.
4 Under Google Apps APIs, select Calendar API. Then click Click Enable.
5 Select Credentials under API Manager in the left-hand menu, click Create credentials, then select OAuth client ID.
6 In the next section “Create client ID,” if it prompts you to Configure consent screen, proceed to that first.
In the “OAuth consent screen” section, all that’s required is a “Product name shown to users.” Enter something here, then click Save.
7 Back in the section “Create client ID,” select Other, enter a name (such as “Simple Calendar”), then click Create. Application type “Web application” should not be used here.
8 At this point your new OAuth client ID and client secret key have been created and will appear.
If you need to come back later to reference them, on the underlying Credentials screen under “OAuth 2.0 client IDs,” click the OAuth client ID that you just created (or the Edit/pencil icon) to view your client ID and client secret key once again.
9 Keep the Google Developers Console page open in one browser tab and head back to your site’s WordPress admin in another. From your WordPress admin, go to Calendars, then Settings from the menu. You should now be on the Event Sources tab and see the following:
10 One at a time copy and paste the Client ID and the Client secret values from the Google Developers Console and paste them in the two fields here. Then click Save Changes.
11 Now that you entered the ID and secret keys, click the link below the Authentication code field. A popup will appear (if you don’t see any, check if your browser is suppressing those). Follow the instructions in the popup and authorize your own application with your Google account.
12 By clicking on Allow, Google will return an auth code which you can paste in the Authentication Code field. Then click Save Changes.
If you are not currently logged in into Google, you must log in first. You are going to authorize Simple Calendar to use calendars of the Google user that is currently logged in. If you share your WordPress installation with other users, they won’t be able to control your Google account but if they have access rights to Simple Calendar they might control or read your calendars or calendars belonging to the user who has authorized Simple Calendar.