From f7a50986176e8aad6e45584b32559ba4c13bda94 Mon Sep 17 00:00:00 2001 From: amit777 Date: Tue, 2 Feb 2021 16:33:43 -0800 Subject: [PATCH] credentials.json file has an object with key "web" The sample code has a key named "installed" which is not defined. --- drive/quickstart/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drive/quickstart/index.js b/drive/quickstart/index.js index a3b8802c..fe72f68f 100644 --- a/drive/quickstart/index.js +++ b/drive/quickstart/index.js @@ -40,7 +40,7 @@ fs.readFile('credentials.json', (err, content) => { * @param {function} callback The callback to call with the authorized client. */ function authorize(credentials, callback) { - const {client_secret, client_id, redirect_uris} = credentials.installed; + const {client_secret, client_id, redirect_uris} = credentials.web; const oAuth2Client = new google.auth.OAuth2( client_id, client_secret, redirect_uris[0]);