The Startup
Published in

The Startup

Reap the Ultimate Benefits of Google Drive and Dropbox Using API

Reap The Ultimate Benefits Of Google Drive And Dropbox Using API


Google Drive API

Avail Oneself Of Google Drive API

  • Download/upload files using Google Drive.
  • Look for files and folders stored in Google Drive. Create multiplex search queries that return any of the file metadata fields in the file resource.
  • Sharing of files, folders, and drives to collaborate on content.
  • Merge with the Google Picker API to search all files in Google Drive, then return the file name, URL, last modified date, and user.

Introduction of PHP


  • PHP version must be greater than 5.4
  • The composer must be installed.
  • Need Google account enabled with google drive.

Step 1: Turn On The Drive API

  • First, you need to login to the Google API console using this link.
  • Then you need to go to the “Credential menu” in the console and register your application with needful details.
  • Now you will get Client ID, Secret Client ID, and Developer Key. You can directly put these keys in your code, or you can download the JSON file for these keys and include this file in your application.

Step 2: Install The Google Client Library

Step 3: Set Up The Code

Export To Google Drive


1. Chooser

2. Saver

Dropbox Credential


Managing Response

Link Types

  • Preview Link
    Its user-friendly preview page of the file.
  • Direct link
    Display the content of the file and the help of downloading the file. This link expires after 4 hours, so make sure to download content quickly and do not use this link to display content on the browser.
    This link also supports CORS.

Supported File Types

Supported Browsers


Triggering The Saver From Javascript




Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store

Helping businesses Solve The Unsolved with a tech-first approach to expedite digital transformation.