Set Up a Project on the Google Cloud Platform

Learn to set up a project on the Google Cloud Platform to generate OAuth credentials.

In this lesson, we'll go through the steps required to create a project on the Google Cloud Platform (GCP). We'll also learn to enable the Blogger API service and generate the OAuth credentials needed to use the Blogger API.

Create a project

Step 1: Head over to the Google Cloud Platform and sign in using your Google account credentials.

Step 2: You'll now be redirected to the Google Cloud console homepage. Click the hamburger menu button in the top left to toggle the navigation menu. Go to "IAM & Admin" from the navigation menu and click the "Create a Project" option.

Step 3: You'll now see the new project page. Enter the project name and click the "CREATE" button.

Step 4: From the top menu bar, click the project name next to the "Google Cloud Platform" label and select the project you just created from the popup window. You'll now be redirected to the project info page.

Enable Blogger API

Step 1: Click the hamburger menu button in the top left to toggle the navigation menu. Go to "APIs & Services" from the navigation menu and click the "Enabled APIs & services" option.

Step 2: From the navigation menu, click "ENABLE APIS AND SERVICES" next to the "APIs & Services" label. This will redirect you to the API library.

Step 3: Type "Blogger API" in the search bar and press the "Enter" key.

Step 4: Select "Blogger API" from the search results. This will open up the Blogger API page.

Step 5: Click the "ENABLE" button. You'll be redirected to the API details page.

Configure consent screen

Step 1: From the "APIs & Services" navigation menu, click the "Credentials" button.

Step 2: On the "Credentials" page, click "CREATE CREDENTIALS" from the top menu bar and select "OAuth client ID" from the dropdown menu. This will redirect you to the OAuth client ID creation page.

Step 3: Click the "CONFIGURE CONSENT SCREEN" button. You'll be redirected to the "OAuth consent screen" page.

Step 4: On the "OAuth consent screen" page, select "External" for "User Type" and click the "CREATE" button. You'll be redirected to the "Edit app registration" page.

Step 5: On the "Edit app registration" page, enter the app name and the email address for the user support email and the developer contact information. Then, click the "SAVE AND CONTINUE" button.

Step 6: To configure "Scopes" for the app, click the "ADD OR REMOVE SCOPES" button.

Step 7: In the "Update selected scopes" window, add the following scopes one by one in the textbox under the "Manually add scopes" heading. After adding each scope, click the "ADD TO TABLE" button.

  • https://www.googleapis.com/auth/blogger

  • https://www.googleapis.com/auth/blogger.readonly

Step 8: After adding both scopes, click the "UPDATE" button. The added scopes will appear under the "Your non-sensitive scopes" heading.

Step 9: Click the "SAVE AND CONTINUE" button.

Step 10: For "Test users," keep the default settings since we don't need to add the current user as a test user. However, if you want to test the applications given in this course using any other account, you may add it as a test user by clicking the "ADD USERS" button. Now, click the "SAVE AND CONTINUE" button. You'll see the summary for the OAuth consent screen.

Step 11: Click the "BACK TO DASHBOARD" button. You'll be redirected to the "OAuth consent screen" dashboard.

Generate OAuth credentials

Step 1: From the "APIs & Services" navigation menu, click the "Credentials" button.

Step 2: On the Credentials page, click "CREATE CREDENTIALS" from the top menu bar and select "OAuth client ID" from the dropdown menu. This time, you'll be redirected to the "Create OAuth client ID" page.

Step 3: In the "Application type" dropdown menu, select "Web application" and enter a name for the application. For "Authorized JavaScript origins" and "Authorized redirect URIs," enter both the URLs given in the widget below.

Press + to interact
{{EDUCATIVE_LIVE_VM_URL}}
{{EDUCATIVE_LIVE_VM_URL}}:3000

Step 4: Click the "CREATE" button. You'll now see your "Client ID" and "Client Secret" keys on the screen in a popup window.

Step 5: Copy the "Client ID" and save it for later use in the application. We don't need the "Client Secret" in this course because it's only needed for server-side operations.