google-javascript-api

List publicly shared files from google drive using service account key not getting public files

无人久伴 提交于 2019-12-14 00:39:48
问题 I have been facing problem while coding that while using service account key and using drive.files.list API, i am not able to get files, though i have shared all the files publicly const { google } = require('googleapis'); const drive = google.drive('v3'); const jwtClient = new google.auth.JWT( client_email, null, private_key, ['https://www.googleapis.com/auth/drive'] ); jwtClient.authorize(function (err, tokens) { if (err) { console.log(err); return; } else { console.log("Successfully

How can you detect that you are logged out with the Google login API?

狂风中的少年 提交于 2019-12-11 06:55:04
问题 I am using the Google login client API for JavaScript. The site I am working on has two relevant pages. It has a login page, and it has a user profile page. The login page obviously has a Google login button on it. You should only be able to view your profile page when you are logged in. When a user goes to their profile page without being logged in, it should redirect them to the login page. Here is an approach I have tried that did not work: // This does not work because this event is only

How to use the Google API client for JavaScript with a One-Tap sign in flow?

天涯浪子 提交于 2019-12-08 08:03:21
问题 I'm using Google One-Tap sign in to authenticate users, and after the user is authenticated I get an access token. I know that I can use this access token in order to work with the Google API client for JavaScript ("GAPI"). But I can't find any way to work with GAPI using this access token. Is there any way to use GAPI assuming I already have an logged in user? What I'm trying to do is access the user calendar after simply authenticating with One-Tap authentication and giving consent for the

List publicly shared files from google drive using service account key not getting public files

戏子无情 提交于 2019-12-06 13:40:53
I have been facing problem while coding that while using service account key and using drive.files.list API, i am not able to get files, though i have shared all the files publicly const { google } = require('googleapis'); const drive = google.drive('v3'); const jwtClient = new google.auth.JWT( client_email, null, private_key, ['https://www.googleapis.com/auth/drive'] ); jwtClient.authorize(function (err, tokens) { if (err) { console.log(err); return; } else { console.log("Successfully connected!"); } }); // List Drive files. drive.files.list({ auth: jwtClient, // fields: "files",

google finance api not working from 6/september/2017

半世苍凉 提交于 2019-12-03 17:50:39
问题 I was using google finance api to get the stock quotes and display the contents on my site. All of a sudden from 6/september/2017 this stopped working. The url i used to get the stock quotes is https://finance.google.com/finance/info?client=ig&q=SYMBOL&callback=?. Previously, i was using yahoo finance api and it was inconsistent. So, i switched over to google finance api. Could you please help me on this? Thanks, Ram 回答1: This url works. I think just the url changed from www.google.com to