Skip to content

Commit

Permalink
docs: update readme for drive readme (#2039)
Browse files Browse the repository at this point in the history
## What's in this PR?

I was going through the example for google drive and came across the README, where I was told to create `oauth2.keys.json`.  What wasn't immediately clear was that everything needed to be nested under a key of `web`, [as shown here](https://github.com/googleapis/google-api-nodejs-client/blob/master/samples/drive/quickstart.js#L29). A specific example would have been really helpful, so I added a quick one.
  • Loading branch information
sbatson5 committed Apr 13, 2020
1 parent 73d284b commit 0110f3e
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion samples/drive/README.md
Expand Up @@ -5,12 +5,26 @@ These samples allow you to list, download, and upload files from Google Drive.
## Running the samples

### **Note: Node.js version 8 or greater is required to run samples.**
Set the following values in `oauth2.keys.json` (up one directory):
Set the following values in `oauth2.keys.json` (up one directory) under the `web` key:

* `redirect_uris`
* `client_id`
* `project_id`
* `client_secret`

Your file should look like this:

```json
{
"web" : {
"redirect_uris": ["http://localhost:3000/oauth2callback"],
"client_id": "<YOUR_CLIENT_ID>",
"client_secret": "<YOUR_CLIENT_SECRET>",
"project_id": "<YOUR_PROJECT_ID>"
}
}
```

__Run the `quickstart.js` sample:__

This sample will list the files in the user's Google Drive.
Expand Down

0 comments on commit 0110f3e

Please sign in to comment.