google-contacts-api

Problem updating Google Contact Picture in Ruby

天涯浪子 提交于 2019-12-10 22:45:50
问题 I am trying to write a ruby app to update Google Contact Photos but I cant get the upload working. Im not sure if I have misunderstood the Google API but this is what I have so far: Net::HTTP.start(URI.parse(image_element.attributes['href']).host) do |http| response, body = http.put(URI.parse(image_element.attributes['href']).path, data, {'If-Match' => '*', 'content-type'=>'image/*'}) end The Google Data API says: Every contact has a photo link element. It has the form: href='https://www

How to create a ContactsService using Google Contact API v3 with OAuth v2 UserCredentials

梦想的初衷 提交于 2019-12-10 20:27:10
问题 My application is using Google API Calendar V3 with the OAuth and this works great. It will ask the user for their consent the first time. It is easy to use the Calendar Service to create, modify and delete calendar events. So far so good! Now I want to ask the user permission for adding and modifying contact data. By adding the following string "https://www.google.com/m8/feeds/" the user is also asked for Contact access approval. This seems to work. However, I can’t find a way to create a

“My Contacts” group google contacts

大兔子大兔子 提交于 2019-12-09 23:48:46
问题 I just wrote a small python script that gets me all the groups on my google contacts list, however for some reason "My Contacts" does not show up in that. I'm using the 3.0 api and was having similar problems with the 2.0 api too. The following is an except taken from the Google 2.0 Contacts documentation. To determine the My Contacts group's ID, for example, you can retrieve a feed of all the groups for a given user, then find the group entry that has the subelement, and take the value of

Google Contacts API - Accessing Other Users

爱⌒轻易说出口 提交于 2019-12-09 03:35:27
I am trying to use the Google Contacts API and the Python / GDATA client handlers to access Contacts via OAuth 2.0 for users in the domain. I'm ultimately wanting to create a web service to add contacts for users, but the first step is getting this test working. I can access my own Contacts just fine if I use the default URI. However, when I pass in the email address to construct the URI for another user, I can't seem to access the other user's Contacts. Here is the code that I'm using: client.GetContacts(uri=client.GetFeedUri(contact_list=userEmail)) A 403 error is returned when I execute

how to grab gmail contact list after user gets authenticated with oauth2

有些话、适合烂在心里 提交于 2019-12-08 18:34:26
After getting user authenticated with oauth2, i got the token. so how that get request should be to retrieve user's gmail contact list in php ? here is the code for oauth2 session_start(); require_once 'src/apiClient.php'; $client = new apiClient(); $client->setClientId('CLIENTID'); $client->setClientSecret('CLIENTSECRET'); $client->setRedirectUri('URI'); $client->setApplicationName("NAME"); $client->setScopes("http://www.google.com/m8/feeds/"); if (isset($_SESSION['access_token'])) { $client->setAccessToken($_SESSION['access_token']); } else { $client->setAccessToken($client->authenticate());

Google Contacts API v3 does not return system groups

若如初见. 提交于 2019-12-08 12:48:25
问题 I found that Google Contacts API v3 does not return system groups when I fetch feed of all contacts: https://www.google.com/m8/feeds/contacts/default/full But if I supply v2 via GET param: https://www.google.com/m8/feeds/contacts/default/full?v=2 all system groups are returned for contact entries. Same thing when i try to fetch list of groups: https://www.google.com/m8/feeds/groups/default/full Is there another way to receive system groups? Or v3 just does not support receiving system groups

How to update angularjs $scope from $.get jquery?

情到浓时终转凉″ 提交于 2019-12-08 11:47:59
问题 I am trying to use the following code and use $scope : var scopes = "https://www.googleapis.com/auth/contacts.readonly"; setTimeout(authorize(), 20); function authorize() { gapi.auth.authorize({client_id: clientId, scope: scopes, immediate: false}, handleAuthorization); } invitePeersController.gmailContacts = []; function handleAuthorization(authorizationResult) { if (authorizationResult && !authorizationResult.error) { $.get("https://www.google.com/m8/feeds/contacts/default/thin?alt=json

Laravel: Google contacts API gives empty results

情到浓时终转凉″ 提交于 2019-12-08 11:28:22
问题 I am trying to use Laravel 4.2 + OAuth2. I am using this package: ardarek-oauth-4-laravel for Laravel. Here are my related files. Problem: Unable to retrieve Google contacts lists. // Config - app/config/packages/artdarek/oauth-4-laravel/config.php - 'consumers' Google' => array( 'client_id' => '**********', 'client_secret' => '*******', 'scope' => array('https://www.googleapis.com/auth/tasks', 'https://www.google.com/m8/feeds/') ), // Controller public function importGoogleContacts() { $code

how to grab gmail contact list after user gets authenticated with oauth2

你说的曾经没有我的故事 提交于 2019-12-08 05:48:56
问题 After getting user authenticated with oauth2, i got the token. so how that get request should be to retrieve user's gmail contact list in php ? here is the code for oauth2 session_start(); require_once 'src/apiClient.php'; $client = new apiClient(); $client->setClientId('CLIENTID'); $client->setClientSecret('CLIENTSECRET'); $client->setRedirectUri('URI'); $client->setApplicationName("NAME"); $client->setScopes("http://www.google.com/m8/feeds/"); if (isset($_SESSION['access_token'])) { $client

google contacts api not adding name and address in google contact

*爱你&永不变心* 提交于 2019-12-08 05:32:01
问题 we are sending xml through curl in cakephp, but only email and phone numbers are adding in google contacts , other fields are blank,can we get proper xml to add all fields in google contacts through api our xml code: $xml = <<<'EOF' <atom:entry xmlns:atom='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005'> <atom:category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/contact/2008#contact'/> <title type="text">TITLE</title> <gd:name> <gd