Create a Google App

Below are the steps for creating a Google App.

Create a New Project

  1. Go to https://console.cloud.google.com/projectcreate

    You'll see one of these New Project screen options depending on whether your google account is part of an organization (google workspace) or not.

New Project view for personal Google accounts

New Project view for Google workspace accounts

  1. Add a name for your project.

  2. For google workspace accounts, select your project's Organization and Location.

  3. Click on the CREATE button.

    Once your new project has been created, you'll get a notification that looks like this:

  1. Click the SELECT PROJECT link in the notification.

Enable APIs for Your Project

  1. From the Google Cloud dashboard, go to APIs and Services on the left menu and then click on Enabled APIs and Services.

  1. Click on + ENABLE APIS AND SERVICES

    This should open up the API Library

  1. Search for and enable the following APIs

    1. Google Calendar API - required for reading calendars and performing CRUD operations on calendar events.

    2. Google People API - required for reading user info such as name and email address.

    3. Admin SDK API - required for reading room info for calendar events.

Configure OAuth Screen

After you've enabled all the APIs, you must configure your Google App's OAuth consent screen. This is the page users will see when authenticating/allowing your app access to their Google account.

  1. From the Google Cloud dashboard, hover over APIs & Services on the left menu. Then click on OAuth consent screen

  1. For User Type, choose either Internal or External, depending on your use case.

    Choose Internal if your app will only be used by users from your organization. Choose External if you want anyone with a Gmail account to be able to use your app. External apps require verification by Google before you can go to production.

OAuth Screen Steps

  1. Fill out all required info for the OAuth screen.

  2. Add pyas.io to your Authorized domains list

  3. Add your developer contact email

  4. Click on SAVE AND CONTINUE

  1. Next, click ADD OR REMOVE SCOPES

  1. Copy the scopes below and paste them into the Manually add scopes textarea.

Scopes to use:

https://www.googleapis.com/auth/userinfo.email
https://www.googleapis.com/auth/userinfo.profile
openid
https://www.googleapis.com/auth/calendar.events
https://www.googleapis.com/auth/calendar.freebusy
https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly
https://www.googleapis.com/auth/calendar.calendarlist.readonly
https://www.googleapis.com/auth/calendar.calendars.readonly
  1. Click ADD TO TABLE and then click UPDATE

  1. Click SAVE AND CONTINUE

  1. If you selected External for the User Type, the next step will be to add test users. Click the +ADD USERS button on the Test users screen.

  1. Enter up to 100 email addresses for your test users and then click ADD.

  1. Click SAVE AND CONTINUE

  1. Review the summary and then click BACK TO DASHBOARD

  1. When you're ready to go to production with your Google App, click the PUBLISH APP button.

Create Credentials

The next thing you need to do is create OAuth credentials for your app. You will need to provide these credentials to Pyas later so we authenticate your users and access their calendars through our API.

  1. From the Google Cloud dashboard, under APIs & Services, click on Credentials.

  1. Click on CREATE CREDENTIALS and then select OAuth client ID

  1. For Application Type, select Web Application

  2. Give your application a name

  3. Add authorized redirect URIs.

    1. Be sure to add https://www.app.pyas.io/org/apps/oauth/google/callback as an authorized redirect URI

    2. Also add https://api.pyas.io/oauth/google/callback as an authorized redirect URI

    3. Add your own redirect URI that you plan on using for your app

  1. Click CRERATE

  2. There should now be a popup with your OAuth credentials. Save them so you can add them to your Pyas account later.

Add Your Google OAuth Client ID and Client Secret to Pyas

  1. Login to your Pyas account

  2. Select the Pyas App you will be updating

  3. Go to the Pyas App's settings tab

  4. Click on Authentication

  5. Under Pyas Authentication, toggle the Enable Pyas Auth for Google Accounts switch off. Then, click the Save Pyas Auth Settings button.

  1. Scroll down to the Native Google Authentication section.

  1. Fill in the Google Oauth Client ID, Google Oauth Client Secret, and Google Oauth Callback URL. Note: the Google Oauth Callback URL should be your authorized redirect url that you added back in the Create Credentials section of this guide.

  2. Once you've added the Google Oauth info, click the Save Google Settings button.

That's it! You should now be able to use your Google App with Pyas to add Google Calendar integrations into your app.

Last updated