google-api

Change detection doesn't run when loading auth2 from Google API

不想你离开。 提交于 2019-12-24 00:09:34
问题 I'm trying to load the script https://apis.google.com/js/api.js?onload=initGapi from within an Angular 2 service in order to make calls to the Google API, but whenever I try to return a value when the script is done loading and initializing, the async pipe doesn't want to render the value to the template. I'm using an EventEmitter that fires when the gapi.load() and gapi.client.init is complete, and the observable is subscribed to it in a component. The async pipe doesn't seem to want to read

TypeError: Cannot read property 'gmail' of undefined

大城市里の小女人 提交于 2019-12-23 23:17:46
问题 let fs = require('fs'); let google = require('googleapis'); getMessage(userId, messageId, callback) { let gmail = this.getGmailService(); var request = google.client.gmail.users.messages.get({ 'userId': userId, 'id': messageId }); request.execute(callback); } when I call this method from a spec getMessage('abcd123987@gmail.com', '15934550ay626ud09') it spits out the following error TypeError: Cannot read property 'gmail' of undefined any comments/suggestions? 回答1: There are 3 options: 1. You

List more than 30 students in a class in Google Classroom API query

半腔热情 提交于 2019-12-23 23:03:08
问题 At this moment, I have a script that works correctly to list students of a class in Google Classroom, but it does NOT list ALL of the students, only the first 30. I need it to list ALL of the students, no matter how many there are. What I have now is the following: function listStudents() { var s = SpreadsheetApp.getActiveSpreadsheet(); var sh = s.getSheetByName('CLASS'); var r = sh.getDataRange(); var n = r.getNumRows(); var d = r.getValues(); for (x = 0; x < n; x++) { var i = d[x][0]; if(i

How can I change the OAuth consent screen email address for my project?

≯℡__Kan透↙ 提交于 2019-12-23 22:09:52
问题 I have a project I'm developing for my company and I have a personal company email address (myname@mycompany.com) as well as a "group" (AKA mailing list/distribution list) that is (support@mycompany.com). I want to use my support@mycompany.com email address to show with the "OAuth consent screen" prompt for the end user. The problem is no matter what Role I give the support@mycompany.com (other than Owner because it will not let group accounts be owners on a project) I can not get the support

Change Google default Auth Redirection - C# (Google liblary)

不羁岁月 提交于 2019-12-23 21:26:59
问题 I try this code: https://developers.google.com/api-client-library/dotnet/guide/aaa_oauth#web_applications my code same But! I need change this default url redirection. Now is: redirect_uri=http:%2F%2Flocalhost:52674%2FAuthCallback%2FIndexAsync How I can change this url? Guys please help. Thank you 回答1: You can inherit form FlowMetadata and override the AuthCallback property. Take a look in the following link: https://code.google.com/p/google-api-dotnet-client/source/browse/Src/GoogleApis.Auth

Google Oauth2 redirect_uri_mismatch when send request from localhost

帅比萌擦擦* 提交于 2019-12-23 20:41:51
问题 I use Google OAuth2 for my codeigniter application and i send request using the HybridIgniter. REDIRECT URIS : http://localhost/college-rating-system/hauth/endpoint. JAVASCRIPT ORIGINS : http://localhost When send request from localhost then we get 400 error that is, Error : redirect_uri_mismatch Any idea ..? 回答1: Check the full error it will tell you the URL its coming from. The redirect URI must match exactly what you have placed in the Google developer console. 回答2: Redirect URIs http:/

YouTube Data API v3 allowed referers for browser app key not working as expected

孤人 提交于 2019-12-23 20:22:15
问题 I am struggling trying to configure the new YouTube Data API v3 correctly. I need to access the API from a Google Chrome extension. I already created an API key from Google APIs Console, more precisely a Key for browser apps (with referers) key. Having the allowed referers set to blank, all the referers are allowed and everything works ok. However, this key is embedded on my Chrome extension and therefore public to everybody. Anyone could use my key to make requests, polluting my stats and

Getting “gapi.client is undefined” when trying to retrieve an authenticated Google+ user's email address

你离开我真会死。 提交于 2019-12-23 20:07:05
问题 I'm trying to retrieve user data from a visitor who has signed in to my site using google + sign in button, but I just end up with the message "TypeError: gapi.client is undefined" in the javascript console. Since I could not identify the error I finally copy/pasted the example code from Google, which can be found here: https://developers.google.com/+/web/people/#retrieve_an_authenticated_users_email_address The only thing I changed was the Client ID (for web applications). And I STILL get

Official reference for Google Spreadsheet Api Structured Query syntax

空扰寡人 提交于 2019-12-23 19:25:31
问题 I'm looking for the official reference for the query syntax used for creating structured queries for requesting rows in the Google Spreadsheet API, as discussed here The only example given is: GET https://spreadsheets.google.com/feeds/list/key/worksheetId/private/full?sq=age>25%20and%20height<175 There must be some references of the query syntax used somewhere? In particular I want to know how to query for all rows (containing column a and b ) for which val(a) != val(b) 来源: https:/

Google drive usage statistics difference between google drive UI and API

*爱你&永不变心* 提交于 2019-12-23 17:25:44
问题 We are using google drive API's About.Get method to return an Abount resource. In google drive statistics displayed as below. But if we are use About resource of google drive response will be getting as follow. { "quotaBytesTotal": "16106127360", "quotaBytesUsed": "17108627", "quotaBytesUsedAggregate": "136771970", "quotaBytesUsedInTrash": "0", "quotaBytesByService": [ { "serviceName": "DRIVE", "bytesUsed": "22255358" }, { "serviceName": "GMAIL", "bytesUsed": "119663343" }, { "serviceName":