360-320-6221 caperren@caperren.com

Google Drive API QuickStart Guide

Hello, and welcome to my quick start guide to accessing the Google Drive API using Javascript! For this entire series, any code snippets I use will have come from the content available at the source code link above. Feel free to download it and follow along!

My code samples can also be found live on the site. THIS link is Google’s original example, and HERE is my finalized version.

The Google Drive API is a way to access the files, folders, sharing options, properties, etc… for the contents of a user’s google cloud storage space. There are a multitude of ways to access this generic API ranging from server and client side implementations in every major language to mobile specific versions that can do neat things like tie into existing accounts registered on a cell phone. Some of these are many orders of magnitude more difficult than is worth covering for a simple intro.

Specifically, server side implementations become very complicated very quickly due to Google’s authentication requirements. While they do have an assortment of quick start guides for most methods, they did not cover much of the pre-setup needed to get the authentication working, nor did they show an example with anything more than a text listing of a couple of files in the root of a drive. So, this quick start manual will try to take the official examples and expand upon them, while specifically focusing on the easier client side connections to the API. Above is the table of contents for this guide, and to start off, we’ll be getting authentication taken care of.

For reference, here are some useful links that I used when making these examples.