OK, I've had some success in PHP 
with https://developers.google.com/google-apps/contacts/v3/reference, but I 
found that in addition to specifying the max-results parameter, I needed to 
include &v=3.0  (specifying the api version to gain access to the contacts 
first and last name).

I also found that PHP's xml parsing provided by simpleXMLLoad did not 
completely parse the XML in the response, it appears simpleXMLLoad doesn't 
 consider tagnames that contain colons (as in gd:email) as valid.  The 
workaround for this was to use the PHP xml_parse modules where you code 
your own start_tag and end_tag routines to identify the beginning and end 
of a tag, and a middle_tag routine to get at the information between the 
beginning and end of a tag (the start_tag function will have access to any 
attributes for the tag).  From there you should be able to create your own 
CSV file with the contents.

One Warning.  Many of my contacts were quite old (some came from GMail when 
it was a separate service), so the data seemed like garbage.  For example 
out of 26 contacts only 11 had both a first and last name, and only 9 had 
email addresses.  Many of the email addresses had no name at all, possibly 
because some of my newer contacts had not yet shared anything with me.

good luck,

On Monday, August 6, 2012 6:31:09 PM UTC-7, Luis wrote:
>
> Hi,
>      I want to retrieve all my Google contacts with a script. I know I 
> must retrieve
> *https://www.google.com/m8/feeds/contacts/default/full?max-results=9999*
> after authentication. No problem with that, except that it is a xml 
> file....
> How can I retrieve the GMAIL-CSV version?
>
> Thanks!
>
>      L.
>

-- 
You received this message because you are subscribed to the Google
Groups "Google Contacts, Shared Contacts and User Profiles APIs" group.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://code.google.com/apis/contacts/community/forum.html

Reply via email to