All Collections
FAQs and Troubleshooting
How to find the API Key for your Google Calendar
How to find the API Key for your Google Calendar

How to find your Google API, which you'll need for using the calendar widget on your website

Matthew Schwartz avatar
Written by Matthew Schwartz
Updated over a week ago

You need a Google Calendar API Key in order for your Google calendar to display on your CrystalCommerce website.

This document will explain (1) How to get an API Key, and (2) How to install the API Key

How to get an API Key

Sign in to your Google account.

Click "Create Project"


Enter a project name. Leave the ID number as is, and just change the text portion. For this example, we are naming ours "Calendar 71007"


Click "Create" and then wait for the project to be created. When it's done, you should see a notification badge at the top right of your screen

Click the notification badge, then click the Project from the dropdown menu

Scroll to the bottom of the page and click "Enable APIs and get credentials like keys"

Click "Enable APIS and Services"

Click in the Search field and type "Calendar"

Click the "Google Calendar API" from the search results

Click the "Enable" button



Click the "Credentials" link on the left

Click the "Create credentials" button, and from the dropdown, click API key


An API key will be generated. Click "Restrict Key" to adjust important settings

Enter a new name in the "Name" field. For example we are using "Calendar API key 1"

In the "Application restrictions" section, click "HTTP referrers (web sites)

In the referrers entry field, type the following, exactly as shown below:

Press the Tab key on your keyboard to confirm the first referrer

Another form field will appear where you may add a second referrer.

Now type the following, as shown below, except replace yourdomainname with your actual website domain name. Our example uses the TLD extension ".com" but if your site uses a different TLD extension, for example ".net" then use that instead. 

Click "Save"

Your API key has been created now, and you need to copy it so you can install it.

Click the copy icon next to the API key to copy it to your computer's clipboard.


Now follow the instructions in the next section...

How to Install the API Key (in your CrystalCommerce site)

You will install the API key in your CrystalCommerce admin, in the "Locations panel."

For instructions how to find that screen, and where to put the API key, please view the "Account > Locations Tab Overview" help article.

NOTES:
a. The API key works in tandem with your Google Calendar ID. To learn how to get your Google Calendar ID, view the "How to find your Google Calendar ID" help article.

b. The Google Calendar that would work is one that does not belong to a group. This means you would need to use the original calendar attached to a google account and not the additional calendars you create. To identify if your calendar is a group calendar, look at the calendar ID. It will indicate if it is a group calendar. 

You'll also need your Google Calendar ID. For help with that, view our "Google Calendar ID" help article.

                    

                    

  

Did this answer your question?