How to find the API Key for your Google Calendar

With Google updating how calendars work, you will need to have an API Key in order for your Google calendar to display on your website. Below are the instructions on how to find your API key, so you will be prepared when we have the UI built for plugging it into your website.

1) Go to https://console.developers.google.com/project

2) Click "Create Project"

Create_Project.png

3) Enter a project name. For this example, we are naming ours "Calendar". Leave the ID field as the default that is supplied (in our case, it was "rare-hull-91518"). Also, make sure to check the "I agree" box, then click "Create".

new_project.png

(you will most likely have to wait a little bit for the project to finish creating after clicking "Create")

4) On the menu on the left, click "APIs & auth", and then "APIs" from the options that appear below. Then, click on "Calendar API" under the "Google Apps APIs" section that appears in the middle of the screen.

apis_and_auth.png

5) On the next screen, click the "Enable API" button

enable_calendar_api.png

6) Under "APIs & auth" (located on the left-hand menu) click on "Credentials"

7) Under Public API access, click "Create new key"

create_new_key.png

8) Click "browser key"

new_key_-_browser_key.jpg

9) In the field on the window that pops up, enter the following text, including asterisks, on separate lines:

*.crystalcommerce.com/*

*yourdomainname.com/*

Make sure that just the first entry has a dot before it, and that the second does not.

Click "Create".

create_browser_key.jpg

10) You will now see your API key. Copy this number, and follow these steps to fill our your fields:

  1. In your CrystalCommerce admin, go to the Account page.
  2. On the black menu bar, click on "Locations"
  3. Click the "Edit" for your main location.
  4. Paste the API key into the "Google Calendar API Key" field

You will also need to make sure you have your Google Calendar ID entered into your Location as well. To find your Google Calendar ID, follow the instructions here