google-contacts-api

Google API v3 retrieving all contacts

谁说我不能喝 提交于 2019-12-03 22:46:37
问题 I'm writing a code (in Java) that let me get all contacts from my google account, using google API v3. My problem is that after I successfully authorize access to account I get contacts only from "Most Contacted" group. As feedURL I'm using https://www.google.com/m8/feeds/contacts/default/full/ according to this tutorial. Basically my code is copy-paste of this example, so how can I get all my contacts? 回答1: In the documentation https://developers.google.com/google-apps/contacts/v3/

Google API Contacts v.3, PHP: add a contact to the group

笑着哭i 提交于 2019-12-03 16:23:02
I successfully managed to create a new contact with cURL, but when I want to add group membership for this contact, I get 400 error. I've read this docs and made the same request, but it didn't work. What am I doing wrong? Thanks for any ideas! This is how I create an XML with group information: $doc = new DOMDocument('1.0', 'UTF-8'); $doc->formatOutput = true; $entry = $doc->createElement('entry'); $entry->setAttribute('gd:etag', $etag); $doc->appendChild($entry); $category = $doc->createElement('category'); $category->setAttribute('scheme', 'http://schemas.google.com/g/2005#kind'); $category

Accessing Google Contacts Api via OAuth 2.0 and private key aka Service Account

和自甴很熟 提交于 2019-12-03 16:03:28
I am currently implementing access to Google Contacts via OAuth 2.0 and a so called Service Account. The service account is generated for an ordinary user like "My.Name@gmail.com". The code to generate the OAuth 2.0 credentials is: public static GoogleCredential getCredentials() throws GeneralSecurityException, IOException { GoogleCredential credential = new GoogleCredential.Builder().setTransport(HTTP_TRANSPORT) .setJsonFactory(JSON_FACTORY) .setServiceAccountId(SingleUserCredentials.SERVICE_ACCOUNT_EMAIL) .setServiceAccountScopes("https://www.google.com/m8/feeds")

Google API : Getting a Contacts Photo

五迷三道 提交于 2019-12-03 12:12:20
I've been able to retrieve everything but the contacts photo by following the API. I can get the img url as well as the gd:etag from the xml returned. Below is the Google API example, and it is the same thing I get, with the value of the attributes being different of course for my contacts. <link rel='http://schemas.google.com/contacts/2008/rel#photo' type='image/*' href='https://www.google.com/m8/feeds/photos/media/liz%40gmail.com/c9012de' gd:etag='"KTlcZWs1bCp7ImBBPV43VUV4LXEZCXERZAc."'> The problem is I don't know how to get it to display. When I try it, I just get the last part of the url

Google Contacts API with Google JavaScript Client Lib

时光毁灭记忆、已成空白 提交于 2019-12-03 02:01:21
I am trying to work with the Google Contacts API v3 . Because of the OAuth2 authentication and authorization I'm started with the Google APIs Client Library for JavaScript . I have no problems with that part of the API access. But after doing the auth part I don't know what to do next. Can I use the google-api-javascript-client for the Google Contacts API v3? In the list of the supported Google APIs by the javascript-client the contacts API does not appear. But I have full access with the OAuth 2.0 Playground tool . I am really confused which client is working best with the latest Google

Google Contacts data API giving 500 Error

偶尔善良 提交于 2019-12-02 12:35:14
问题 I am using OAUTH2 authentication to import GMAIL contacts . In my code I am storing the config parameters in an array : $clientid=<my Client id>; $clientsecret=<my client secret>; $redirecturi=<my redirect URL>; $max_results = 25; Below is how I create the POST array : $fields=array( 'code'=> urlencode($auth_code), 'client_id'=> urlencode($clientid), 'client_secret'=> urlencode($clientsecret), 'redirect_uri'=> urlencode($redirecturi), 'grant_type'=> urlencode('authorization_code') ); $post =

Not able to fetch Google Contacts by calling API in Swift

ⅰ亾dé卋堺 提交于 2019-12-02 10:23:25
I am trying to fetch Google Calendar events and Google Contacts to my Swift (iOS) application. I am able to login successfully to Google sign-in and able to fetching the Calendar events too. But, while trying to fetch Google Contacts, its throwing 403 error, but, I have already Enabled the API to my project in google developers console. private let scopes = ["https://www.googleapis.com/auth/calendar.readonly","https://www.googleapis.com/auth/plus.login","https://www.googleapis.com/auth/plus.me","https://www.googleapis.com/auth/contacts.readonly"] override func viewDidLoad() { super.viewDidLoad

Google Contact API Fetch Contacts related to a Contact Group

你离开我真会死。 提交于 2019-12-02 09:05:58
I would like to know how to get all contacts related to a group. Let's say I have a contact group named "My Special Group" and the ID is xxxxxxx.I just want to retrieve contact under the "My Special Group" only. I have already tried this Request URI and test it on oauth2 playground: https://www.google.com/m8/feeds/contacts/default/full/?group=xxxxxxx. https://www.google.com/m8/feeds/contacts/myemail%40gmail.com/full/?group=xxxxxxx. And the result is: <errors xmlns="http://schemas.google.com/g/2005"> <error> <domain>GData</domain> <code>invalid</code> <internalReason>Supposed groupUri

Add contacts to Google Contacts' main Contacts list (not hidden)

一个人想着一个人 提交于 2019-12-02 03:26:11
I'm using the GAS code bellow to add a new contact into Google Contacts ( https://contacts.google.com/ ): var contact = ContactsApp.createContact('Bbbb', 'Cccc', 'mymail@mails.com').addUrl(ContactsApp.Field.WORK_WEBSITE, 'https://sites.google.com/site/diccionarioie'); The code works perfectly but for a single detail: it adds the new contact to a hidden list and not to the main or visible «Contacts» list. I know it works because when I use the lookup box to search for the newly created contact it's there, in the «Other contacts» list. I need it to be created in the main «Contacts» list from the

“If-Match or If-None-Match header or entry etag attribute required” Error when trying to update a contact on google contacts using Zend Framework

徘徊边缘 提交于 2019-12-01 13:08:23
Hi guys I'm trying to update my google contacts using the zend framework but I'm getting the following error: Expected response code 200, got 403 If-Match or If-None-Match header or entry etag attribute required The following is my code: Zend_Loader::loadClass('Zend_Gdata_ClientLogin'); Zend_Loader::loadClass('Zend_Http_Client'); Zend_Loader::loadClass('Zend_Gdata_Query'); Zend_Loader::loadClass('Zend_Gdata_Feed'); $client = getGoogleClient('cp'); // this is a function I made - its working fine $client->setHeaders('If-Match: *'); $gdata = new Zend_Gdata($client); $gdata-