Obtaining an access token for Google Drive - 6.3

Talend Open Studio for Big Data Components Reference Guide

EnrichVersion
6.3
EnrichProdName
Talend Open Studio for Big Data
task
Data Governance
Data Quality and Preparation
Design and Development
EnrichPlatform
Talend Studio

To use Google Drive API, you need first to obtain the access token by completing the following steps using Google Chrome:

  1. Go to the Google API Console and select an existing project or create a new one. In this example, we create a new project TalendProject.

  2. Go to the Library page and in the right panel, click Drive API and then click ENABLE to enable the Google Drive API that allows clients to access resources from Google Drive.

  3. Go to the Credentials page, click OAuth consent screen in the right panel and set a product name in the Product name shown to users field. In this example, it is TalendProduct. When done, click Save to save the change.

  4. Click Create credentials > OAuth client ID, and in the Create client ID page, create a new client ID TalendWebClient with Application type set to Web application and Authorized redirect URIs set to https://developers.google.com/oauthplayground.

    The created OAuth client ID and client secret will be used for obtaining the access token.

  5. Go to the Google Developers OAuth 2.0 Playground, click OAuth 2.0 Configuration and select Use your own OAuth credentials check box, enter the OAuth client ID and client secret you have already created in the OAuth Client ID and OAuth Client secret fields respectively.

  6. In OAuth 2.0 Playground Step 1, select the scope https://www.googleapis.com/auth/drive for the Google Drive API and click Authorize APIs, then click Allow to generate the authorization code.

  7. In OAuth 2.0 Playground Step 2, click Exchange authorization code for tokens to generate the OAuth access token.

    The OAuth access token is displayed on the right panel as shown in below figure. Note that the access token expires in every 3600 seconds. You can click Refresh access token in OAuth 2.0 Playground Step 2 to refresh it.