Enable Dark Mode!
how-to-enable-google-drive-api-on-the-google-console.jpg
By: Mohamed Savad V

How to Enable Google Drive API on the Google Console

Odoo 16

Google Drive is a cloud-based service that allows users to store and sync files. By using this, users can share files, sync data between devices, and store files in the cloud.  Along with a web interface, Google Drive also offers desktop and mobile apps with offline capabilities for Windows, macOS, Android, and iOS devices.

Here, we go over how to retrieve client credentials and enable the Google Drive API.

1 . Create a new Project in the google cloud platform

If you have a cloud account, log in

If not, follow the steps below

> https://console.cloud.google.com/getting-started?pli=1 

You can access the Cloud platform's home page by clicking this link

how-to-enable-google-drive-api-on-the-google-console-1-cybrosys

Choose your nation from the list, review the Terms of Service, and then press the ‘Agree and Continue’ button. The system might request human verification

how-to-enable-google-drive-api-on-the-google-console-2-cybrosys

Now click the ‘Start Project’ button. We can see a popup that displays all of the created projects.

To start a new project, Click on "New Project."

how-to-enable-google-drive-api-on-the-google-console-3-cybrosys

Finally, give your project a name and click "create." It can take a few seconds to set up.

Now the project is created.

2. Create  OAuth consent screen

After the creation of the project we need to ‘Create OAuth consent screen’. The OAuth consent screen is a prompt that tells users who's requesting access to their data and what kind of data users are allowing your app to access.

how-to-enable-google-drive-api-on-the-google-console-4-cybrosys

To create an OAuth consent screen, click the OAuth consent screen in the sidebar's section under APIs & Services.

how-to-enable-google-drive-api-on-the-google-console-5-cybrosys

In this screen we can see two types of users 

1 . Internal

If we are Google workplace users, then only this User type is available.

It is Only available to users within your organization. 

2 . External 

Using this user type anyone can access this project by API

After selecting ‘External’  click on create button, that will redirect to a page like this,

how-to-enable-google-drive-api-on-the-google-console-6-cybrosyshow-to-enable-google-drive-api-on-the-google-console-7-cybrosys

In this window, we need to provide app information. In the app name field, we can add a descriptive name for our app. Provide a user contact email, at the end of the form view we need to specify a ‘Developer Contact Email’ also. Then click on save and continue.

Under scops, no need to specify anything. You can just move on by clicking the save and continue button, and also, in optional info, we can leave it blank.

Now we can see the summary of the created OAuth consent screen. After the creation of the OAuth consent screen, we need to publish the app. Click on the publish app button. Now the setup is completed.

how-to-enable-google-drive-api-on-the-google-console-8-cybrosys

3 . Enable Drive API

After creating the OAuth consent screen, we need to enable Drive API. For that, open the API Library and search for the drive, and select the service shown below. Then click on the enable button.

how-to-enable-google-drive-api-on-the-google-console-9-cybrosys

how-to-enable-google-drive-api-on-the-google-console-10-cybrosys

It takes some time.

3. Create OAuth client ID

After enabling Drive API, we can move to our APIs & Services section. In the window shown below, we can see the menu ‘Credentials’. After clicking on it we can see a button ‘Create credentials’ and select OAuth client ID.

how-to-enable-google-drive-api-on-the-google-console-11-cybrosys

After choosing the OAuth client ID, we need to add some more information about our project. First, select the application type as Desktop and set a name for Client ID, and click on the CREATE button. It may take some time to take effect.

how-to-enable-google-drive-api-on-the-google-console-12-cybrosys

After creating the OAuth Client ID a pop will display like this.

how-to-enable-google-drive-api-on-the-google-console-13-cybrosys

Now, we can see our Client ID and also the client's secret. Under that field, there is an option to download a secret file as a JSON. Just click that button. The file will download soon.

The file looks like this,

how-to-enable-google-drive-api-on-the-google-console-14-cybrosys

This approach can also be used to enable various Google API services, such as calendar and contact. If in any case the JSON file is lost we can download it again from the credential window.


If you need any assistance in odoo, we are online, please chat with us.



0
Comments



Leave a comment



whatsapp
location

Calicut

Cybrosys Technologies Pvt. Ltd.
Neospace, Kinfra Techno Park
Kakkancherry, Calicut
Kerala, India - 673635

location

Kochi

Cybrosys Technologies Pvt. Ltd.
1st Floor, Thapasya Building,
Infopark, Kakkanad,
Kochi, India - 682030.

location

Bangalore

Cybrosys Techno Solutions
The Estate, 8th Floor,
Dickenson Road,
Bangalore, India - 560042

Send Us A Message