google-api

Gmail API is overwriting the custom Message-ID header while sending emails

橙三吉。 提交于 2019-12-22 12:13:40
问题 We are using the Gmail API to send emails on behalf of the users of our App. On the header of the emails we send via the Gmail API, we are setting a custom Message-ID. Nevertheless Gmail is overwriting the Message-ID we set with a different one . The following are some Message-IDs that we have tried: <8368110f-6ffc-46f8-8e67-7ebf0e1a1d83@domain> <4fb7a8b7013099c524f70906e009b46218461fff0b2dc0f8b794eb2df26e93d7@domain> Any idea why this ID overwriting is happening ? I would really appreciate

How to send an image to a Javascript client using JSON from a Java server

廉价感情. 提交于 2019-12-22 11:29:29
问题 I am working on Google Contacts API and I received all data and sending as string to JSON (javascript) but when I get an image from contacts I can receive image. How can I send it to JSON? How can send the image file to a URL? (Can I use signpost?) if (photoLink.getEtag() != null) { GDataRequest request = myService.createLinkQueryRequest(photoLink); request.execute(); // No Authentication header information InputStream stream = request.getResponseStream(); Image image= ImageIO.read(stream); }

Google spreadsheets API C# missing resource version id on batch update

邮差的信 提交于 2019-12-22 10:28:36
问题 I'm trying to batch update the empty cells using the spreadsheets api C# v2.2.0.0 this way: foreach (var csvline in csv) { var csvlineParsed = csvline.Split(';'); for (uint index = 0; index < csvlineParsed.Length; index++) { var cellEntry = new CellEntry(i, index + 1, csvlineParsed[index]); cellFeed.Insert(cellEntry); var cell = new CellEntry(i, index + 1); cell.Id = new AtomId(string.Format("{0}/{1}", cellFeed.Self, "R" + i + "C" + index + 1)); cell.InputValue = csvlineParsed[index]; cell

Referer security when requesting a Simple API Access Key

て烟熏妆下的殇ゞ 提交于 2019-12-22 10:17:19
问题 I'm working inside of a Google Chrome extension. Extensions do not send out a "Referer" header when issuing requests, but it is possible to (potentially) modify this behavior by using chrome.webRequest.onBeforeSendHeaders. I am attempting to communicate with Google's YouTube V3 API. To do so, I must provide an API key. A successful request to their server looks like: $.ajax({ url: 'https://www.googleapis.com/youtube/v3/playlists?part=snippet&id=ALYL4kY05133rTMhTulSaXKj_Y6el9q0JH&key

How can I get file's 'lastModified' in Google Drive API v3?

帅比萌擦擦* 提交于 2019-12-22 10:12:21
问题 I recently decided to migrate from Drive API v2 to v3. In v2, files().get(fileId) returns almost all attributes, but in v3, it doesn't return the lastModified , which is very essential for me. Is there anyway I can do it in v3? 回答1: In Drive API v3 full resources are no longer returned by default. Use the fields query parameter to request specific fields to be returned. See docs. 来源: https://stackoverflow.com/questions/35435934/how-can-i-get-files-lastmodified-in-google-drive-api-v3

“policy_enforced” error when exchange oauth2 token for google plus

拈花ヽ惹草 提交于 2019-12-22 10:07:55
问题 Our app used to work fine until last Tue. We kept getting "policy_enforced" error while exchange oauth2 token for google plus. The response from google is: Google.Apis.Auth.OAuth2.Responses.TokenResponseException: Error:"policy_enforced", Description:"Access denied by a security policy established by the Google Apps administrator of your organization. Please contact your administrator for further assistance.", Uri:"" We're using google-api-dotnet-client and the code is straight forward enough

Google Authentication Token return doesn't contain refresh_token

五迷三道 提交于 2019-12-22 09:49:51
问题 I write an example about google api using. Google NodeJS Client library. I have followed the instruction set access_type : 'offline' , however the object return doesn't contains refresh_token . My Code: var http = require('http'); var express = require('express'); var Session = require('express-session'); var google = require('googleapis'); var plus = google.plus('v1'); var OAuth2 = google.auth.OAuth2; const ClientId = "251872680446-rvkcvm5mjn1ps32iabf4i2611hcg086e.apps.googleusercontent.com"

React Native fetch() not working

随声附和 提交于 2019-12-22 08:45:37
问题 I am trying to create a React Native app which fetches data from Google APIs but I am experiencing some issues (Unhandled JS Exception: undefined is not an object (evaluating 'responseData[0].destination_addresses') ). Here is the code: 'use strict'; var React = require('react-native'); var { AppRegistry, StyleSheet, Text, View, TouchableHighlight, } = React; var INITIAL_DATA = [ {city: 'CityName', duration: "0 hours"}, ]; var REQUEST_URL = 'https://maps.googleapis.com/maps/api/distancematrix

How long is the Google API key Valid?

大城市里の小女人 提交于 2019-12-22 08:42:10
问题 I'm am fetching playlist's details using Youtube API V3 using API key. I can't find any information about API KEY validity period. I want to make sure I regenerate a new API key for my application before it expires. 回答1: The public API key found at the bottom of the Google Developers console APIs & auths -> credentials screen does not expire. This is a key used for accessing public APIs like Playlists.list, it will remain valid for as long as you do not delete the key or delete the project

Google javascript API library - Calendar watch notifications

帅比萌擦擦* 提交于 2019-12-22 08:41:08
问题 I am trying to subscribe to calendar event notifications with the JS client library like this: gapi.client.load('calendar', 'v3', function () { var request = gapi.client.calendar.events.watch({ 'calendarId': cl.gCalendarID, 'id': unid, 'type': "web_hook", 'address': {my url here} }); request.execute(function (resp) { console.log(resp); }); }); But I just keep getting 400 returned with an unhelpful message of " Entity.Resource " In the data object of the response I get Domain:global, Message: