How to integrate Google Drive into your applications?
How to integrate Google Drive into your applications
To be able to integrate Google Drive in our applications, the fundamental requirement is to have a Google account. In case of having it, you would have to log in, with our email and our password. If you do not have an account on Google, to register it would be necessary to enter the main website of Google, at www.google.es, and click on registering .
Google record
Once registered and with the session initiated, we go to the main page of Google, to the nine squares in the upper right corner and the left of our profile photo, and then in more of Google . Once there, we click on for companies , and then in Google Cloud . We will be an image like the following:
Project creation in Google Cloud
Once there, we click on the upper right corner in console , and something like the following appears:
To be able to access Google's API we have to create an application on Google Cloud. To do this, we click on creating resources , and then in creating project . We will get something like the following:
We assign a name to the project that we want to create, and once written we click on the Create .
Creation of Oauth credentials
Once created we click on the following link:
https://console.develers.google.com/
And we go to the project that we have created, to the left panel in credentials , and then click on creating credentials , and then in creating Oauth's client ID , and something like the following will come out:
In type of application we select web application , and we assign a name:
Although it does not appear as mandatory, it is also adding at least one authorized redirection uri. For the example of the code that we explain later, it is used in a mandatory way. Once created, we can download the credentials of the Oauth 2.0 customer ID , and in the arrow button. Once the credentials are obtained, we take steps 3 and 4 of the following link:
https://develers.google.com/drive/api/v3/quickstart/nodejs
where we can get the access token to our cloud in Google Drive.