Upgrade File Manager 8.1.1Get your Digital Ocean files and folders in File Manager. Upgrade to 8.3 today! Learn More

Upgrade File Manager 8.1
Flash SaleSAVE 20% *does not apply to the purchase of File Manager Developer
  • Days
  • Hours
  • Mins
  • Sec
  • Documentation

    Google Drive Integration New

    Google sign-in allows your site visitors to login through Google in one click. Before you can integrate Google sign-in into your website, you need to create a Google client ID and Client Secret.

    And for using Google Drive API, you need first to obtain the access token by completing the following steps:

    1.Go to the Google API Console and Navigate to the tab “Credentials“.
    Google Developers Console. Credentials - How to get Google Client ID and Client Secret

     

    2. Click Select a project >> New Project and then click the button “Create“.
    Please Note that you can also select an existing project.

    Google Client ID. Create Project - How to get Google Client ID and Client Secret

    3. Click ENABLE to enable the Google Drive API that allows clients to access resources from Google Drive.



     

    4. Go to the Credentials page, click OAuth consent screen in the right panel and Enter the Application name, Authorized domains and click the button “Save“.





    5. Click Create credentials > OAuth client ID, and in the Create client ID page, create a new client ID 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.

     

    6. 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.

    7. 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.

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

     

    9. 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.