Setting Up with Google

To develop using the Google APIs you need to set up a few things with your Google account. You may choose to follow The Official Documentation for Getting Started, but we’ll hit the key points here. You’ll have to do all this regardless of whether you use the provided Python bindings or the googly library.

Step 1: Google Cloud Project

The first thing you need is an overarcing project that you can use for all your code.

  1. Visit The Google Cloud Console.

  2. Agree to terms of service with the Google Account you wish to use (if needed)

  3. At the top of the page, there should be a widget to “Select a project” Select a project widget

    If there are no projects available, you’ll need to create one. a. To create a project, click New Project, and then enter a project name.

  4. Once you have selected your project, it should look like this: Selected project widget

Step 2: Credentials

Next, you’ll need to create a method for authenticating with your project.

  1. Visit the Credentials page.

  2. Click “Create Credentials” at the top of the screen.

  3. Select “OAuth client ID”

  4. Pick an Application Type. Desktop App seems appropriate for many little Python scripts.

  5. Download the credentials JSON and save it as secrets.json alongside the code you will be running.

Step 3: Enable APIs

You will need to enable each separate API you want to use. You can search for them in the APIs library or jump to them directly below.

Step 4: Test Users

If you are using some sensitive bits of the APIs, then you will either need to “publish” your application, or you can manually add users that can use your code. The latter is infinitely easier if you’re just working with your own data. Both can be done from the consent screen configuration