google-data-api

Google Contacts API - failing to refresh access token

流过昼夜 提交于 2019-12-07 05:48:34
问题 We use Google Contacts API with OAuth2: credential = new GoogleCredential.Builder().setTransport(new NetHttpTransport()) .setJsonFactory(new JacksonFactory()) .setClientSecrets(OAuth2ClientId(), OAuth2ClientSecret()) .addRefreshListener(new CredentialRefreshListener() {...}); myService = new ContactsService("My-App"); myService.setOAuth2Credentials(credential); and quite regularly we receive '401 Unauthorized' response that the GData library can't handle. AuthenticationException throws NPE

Updating cell in Google Spreadsheets returns error “Missing resource version ID” / “The remote server returned an error: (400) Bad Request.”

大兔子大兔子 提交于 2019-12-06 01:01:33
I would like to update a cell value in Google Spreadsheets but unfortunatelly an error is received: Google.GData.Client.GDataRequestException was unhandled HResult=-2146233088 Message=Execution of request failed: https://spreadsheets.google.com/feeds/cells/1nW8nxoS2l9pbj6dctreEfKHNXmsfbbsCAvOd7TIj4Bo/od6/private/full/R1C1 Source=Google.GData.Client ResponseString=Missing resource version ID StackTrace: at Google.GData.Client.GDataRequest.Execute() ... at System.Threading.ThreadHelper.ThreadStart() InnerException: System.Net.WebException HResult=-2146233079 Message=The remote server returned an

Google Sites API + OAuth2 (on Appengine)

心已入冬 提交于 2019-12-05 20:53:06
I've been trying to make use of the Python Library to access the Google Sites API. The first step requires a user to authorize our application, they recommend to use OAuth2 and they provide a library that can be found here . At the end of the authorization process you end up with an OAuth2Credentials object. The problem is, when I try to make requests to the Google Sites API, let's say I do: import gdata.sites.client client = gdata.sites.client.SitesClient(site=None, domain='mydomain.com') I don't know how to make use of the OAuth2Credentials object. I spent quite a few hours trying to do

Using jQuery $.getJSON() with Google Picasa Data API

不羁岁月 提交于 2019-12-05 07:28:23
问题 This is my first attempt at using the Google Data API, and I'm getting unexpected results using jQuery's $.getJSON() function. Here is my code: $(document).ready(function(){ var json_Album_URI = "https://picasaweb.google.com/data/feed/base/" + "user/" + "thewoodsmyth" + "?alt=" + "json" + "&kind=" + "album" + "&hl=" + "en_US" + "&fields=" + "entry(media:group,id)" + "&thumbsize=" + 104; $.getJSON(json_Album_URI, function(data){ $.each(data.feed.entry, function(i,item){ //Thumbnail URL $.each

Google Data API - Two Legged Auth Token Reuse

一个人想着一个人 提交于 2019-12-04 14:17:07
问题 I am using two legged OAuth for Google Contact Data API and generating token on each request. Is it advisable or Should I store token to reuse it next time ? Also, How to detect stale token ? I am using python. ( and Gdata Python Client Library ). Edit: Ok, I figure, the token is generated on client side with encrpytion and not collected from server side, so it is ok to generate token on each request. Am I correct ? and that means, the token never change for a user ( unless I change shared

AUTH_TOKEN_TYPE for Google API's

你说的曾经没有我的故事 提交于 2019-12-04 12:37:12
Okay, so I know how to get a list of accounts so that I can let the user authenticate my app to use with their Google Data, however, I am confused on what to use for my AUTH_TOKEN_TYPE . Here is the current code that I have: AccountManager.get(this).getAuthTokenByFeatures("com.google", AUTH_TOKEN_TYPE, null, this, null,null) I don't know where to find the AUTH_TOKEN_TYPE for the Picasa API that I want to use (along with all the other Google API's). Any help? AUTH_TOKEN_TYPE is the OAuth scope for the API, to be used. For account manager to understand that it is an OAuth2.0 you need to append

Login to Google without Google+ login button but user credentials

邮差的信 提交于 2019-12-04 06:27:19
问题 I have a specific problem, the application is only for a set of people whose Google credentials are on my server. I make a login to my server, look-up the Google credentials and send them back and Create an OAuth authentication to interact with Google services. (Because I don't want the app to be device specific I want to use accounts other than those registered on my device, which completely fails in a G+ sign in mechanism) Currently I use a Deprecated Client ID mechanism wherein I pass the

Client-side retrieval of Google Contact pictures

微笑、不失礼 提交于 2019-12-03 15:46:25
I'm fetching google contacts in a webapp using the Google JavaScript API and I'd like to retrieve their pictures. I'm doing something like this (heavily simplified): var token; // let's admit this is available already function getPhotoUrl(entry, cb) { var link = entry.link.filter(function(link) { return link.type.indexOf("image") === 0; }).shift(); if (!link) return cb(null); var request = new XMLHttpRequest(); request.open("GET", link.href + "?v=3.0&access_token=" + token, true); request.responseType = "blob"; request.onload = cb; request.send(); } function onContactsLoad(responseText) { var

Google Data API - Two Legged Auth Token Reuse

萝らか妹 提交于 2019-12-03 09:07:07
I am using two legged OAuth for Google Contact Data API and generating token on each request. Is it advisable or Should I store token to reuse it next time ? Also, How to detect stale token ? I am using python. ( and Gdata Python Client Library ). Edit: Ok, I figure, the token is generated on client side with encrpytion and not collected from server side, so it is ok to generate token on each request. Am I correct ? and that means, the token never change for a user ( unless I change shared secret ) right ? I think that the two legged oauth scenario does not involve creating tokens. Tokens are

How to skip carriage returns in csv file while reading from cloud storage using google cloud dataflow in java

大憨熊 提交于 2019-12-02 22:54:34
问题 I have a CSV file which consists of new carriage returns (\n) in each row. While reading the CSV file from cloud storage using TextIO.read function of Apache beam it is considering \n as new record. how can i overcome this issue. I have tried with by extending filebasedsource but it is reading only first line of the CSV file when we apply pTransorms. help will be appreciated Thanks in Advance 回答1: TextIO can not do this - it always splits input based on carriage returns and is not aware of