Creating API Key for Singular Google Widgets

Creating an API Key is necessary to use Singular Google Widgets such as the Google Sheets Widget. The following is a tutorial on how to create an API Key.

1. Create a Project

Note

Creating a new project is not necessarily required. You can skip this step if you want to use an existing project and continue with Enable Google Sheets API.

Open Google Chrome and log into your Google Account. Create a project, here, and define a project name e.g., “Google Charts Widget” or whatever you want to call it.

02-create-project.jpg

Creating the project can take one or two minutes. Your project will be listed in the Cloud Resource Manager.

03-project-overview.jpg

2. Enable Google Sheets API

Open Google Chrome and log into your Google Account. Next, open the Google Developer Console and select your project.

Search in the toolbar for "Google Sheets API" and add it.

05-add-google-sheets-api.jpg

Next, enable “Google Sheets API”.

06-enable-google-sheets-api.jpg

3. Generate an API Key

There are a few steps in your Google account to start, specifically generating a Google API key. Essentially the API is the code or "key" that governs the access point(s) between Singular's Google Widgets and Google.

Open the “Credentials” menu for your project. Note, your project is listed in the top toolbar.

07-open-project-credentials.jpg

Select “Create Credentials” and then hit “API key”.

08-select-create-api-key.jpg

Next, select “Restrict Key”.

09-select-restrict-api-key__1_.jpg

Then, select "None" in the Application restrictions menu.

API_Key_restriction_None.png

Define API restrictions. Select your Google Sheets API.

12-define-api-restrictions.jpg

Screen_Shot_2020-04-27_at_11.05.32_AM.png

Save your settings.

13-google-sheets-api-key.jpg

Now you can select the clipboard icon to the right of your newly created Google Sheets Widget API key to copy it. You'll need this for use in Google type Singular Widgets.

About Quota Limits

It is important to be aware that Google defines a quota of 60 requests per 60 seconds for each API key. Learn more about Google API limits here.

This sounds a lot but if you are using multiple Google Sheet widgets in a single Composition, you could hit this limit. In these cases, Google prints tons of error messages in the console indicating the issue.

You can avoid running into API quotas by:

  • Reducing the number of Google Sheet Widgets in the same Composition
  • Reducing the refresh frequency and increasing the duration between requests
  • Reducing the number of Output URLs to a minimum
  • Using multiple API keys
Was this article helpful?
14 out of 15 found this helpful

Comments

2 comments

  • Absolutely nothing like the google screens so completely lost. Why does it have to be this difficult

    0
  • Hi lgartsheritage at which step have you gotten stuck? Maybe we can help.

    0

Please sign in to leave a comment.