CS-Cart

Set Up Google APIs with OAuth for Secure Access

Working with Google APIs like the Google Sheets API may feel confusing at first, as it involves multiple steps in Google Cloud Console.

This guide explains how to set up secure access to Google APIs, such as Google Sheets and Google Drive, using OAuth. OAuth is the permission method that lets only authorized users reach the data, so information stays protected. The post walks through the setup in Google Cloud Console step by step: creating a project, enabling the APIs you need, and creating OAuth credentials. It is written for anyone who needs to connect an application to Google services and wants a plain, ordered explanation of the process rather than a technical reference.

Google APIs, like Google Sheets or Drive, need a secure way to access data. OAuth helps give permission safely, so only authorized users can use the data. Setting up OAuth in Google Cloud Console may seem tricky at first, but with the right steps, it becomes easy. This guide explains how to enable APIs, create credentials, and set up secure access in a simple way.

Create a Project in Google Cloud

Start by creating a project in Google Cloud Console. A project works as a central place where all API settings, credentials, and configurations are stored. It helps you manage everything in one place and keeps your work organized.

Click on “Select a project” to open the projects list.

Set Up Google APIs with OAuth for Secure Access — illustration 1
  • Press “New Project” to start the project creation process.
Set Up Google APIs with OAuth for Secure Access — illustration 2
  • Enter a project name, choose the parent resource (if needed), and click Create to set up your project in Google Cloud Console.
Set Up Google APIs with OAuth for Secure Access — illustration 3
  • The newly created project appears in the list. Click on it to access it. 
Set Up Google APIs with OAuth for Secure Access — illustration 4
  • From the corner navigation menu, go to APIs & Services and then open the Library.
Set Up Google APIs with OAuth for Secure Access — illustration 5
  • Select the Google Sheets API.
Set Up Google APIs with OAuth for Secure Access — illustration 6
  • Hit “Enable” to change its status to active.
Set Up Google APIs with OAuth for Secure Access — illustration 7
  • Also, enable the Google Drive API to access and manage Google Sheets files stored in Google Drive.
Set Up Google APIs with OAuth for Secure Access — illustration 8
  • Now, select the Credentials options, tap on Create credentials, and select the OAuth client ID.
Set Up Google APIs with OAuth for Secure Access — illustration 9
  • Press the Configuration consent screen.
Set Up Google APIs with OAuth for Secure Access — illustration 10
  • Enter “Get started” to start the project configuration process. 

Set Up Google APIs with OAuth for Secure Access — illustration 11


  • Enter details in the App information fields. 
Set Up Google APIs with OAuth for Secure Access — illustration 12
  • Select the external User type. 
Set Up Google APIs with OAuth for Secure Access — illustration 13
  • Agree the policy, proceed with continue and press "Create" button at the end.
Set Up Google APIs with OAuth for Secure Access — illustration 14
  • Continue by using the “Create OAuth Client”.
Set Up Google APIs with OAuth for Secure Access — illustration 15
  • Choose the Application type. 
Set Up Google APIs with OAuth for Secure Access — illustration 16
  • Next, enter a name to identify the OAuth client in the Google Cloud Console. This name is only for internal use.
  • Add redirect URLs where the response will be sent after authentication. Multiple URIs can be added if needed.
  • And press the “Create” button.
Set Up Google APIs with OAuth for Secure Access — illustration 17


  • The above redirect links are available in the Settings tab of the admin panel. 

Set Up Google APIs with OAuth for Secure Access — illustration 18

  • Select “Download JSON” to save the file.
Set Up Google APIs with OAuth for Secure Access — illustration 19
  • Also, add emails in the Audience section to allow selected test users to access the approved Google service during testing mode.
Set Up Google APIs with OAuth for Secure Access — illustration 20
  • Now, the JSON file is ready to use for authentication, and it can be added to the app /add-on to connect with Google Sheet services.

Frequently asked questions

What is OAuth used for when connecting to Google APIs?

OAuth is the method that grants permission to access Google data safely, so that only authorized users can use it. It is how you set up secure access to services like Google Sheets and Google Drive without exposing the data to anyone else.

Which Google APIs does this guide show you how to enable?

The guide covers enabling the Google Sheets API and the Google Drive API. The Drive API is enabled so you can access and manage the Google Sheets files that are stored in Google Drive.

Why do I need to create a project in Google Cloud Console first?

A project acts as a central place where all your API settings, credentials, and configurations are stored. Creating one first keeps everything organized and lets you manage the setup in a single location before you enable APIs or create credentials.

Where do I create the OAuth credentials once the APIs are enabled?

In the Credentials section of Google Cloud Console, you choose Create credentials and select OAuth client ID. You then configure the consent screen to complete the secure access setup.

N
Nisha Gaur · Technical Content Writer, Ecarter Technologies

Nisha Gaur is a Technical Content Writer at Ecarter Technologies. She writes technical documentation, tutorials and buying guides covering CS-Cart, Magento, Shopify and eCommerce development.

Talk to our team