To use an access token to access Google Drive, you need to first generate the access
token by completing the following steps using Google Developers OAuth
Playground.
Procedure
-
Go to Google Developers OAuth
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.
-
In OAuth 2.0 Playground Step 1, select the scope
https://www.googleapis.com/auth/drive under
Drive API v3 for the Google Drive API and click
Authorize APIs, then click
Allow to generate the authorization code.
-
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. It can be used by Google Drive components and metadata wizard to
access Google Drive via the OAuth method Access
Token.
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.