Pulling Gmail's 'Other Contacts' group via the Google Contacts API
Asked Answered
P

1

10

I'm trying to pull my Gmail contacts, so I can auto-complete on the 3,000 or so contacts I have within Gmail. Using the Google Contacts Data API, I'm able to get a list of (1) default contacts and (2) groups.

However, (1) the default contacts (http://www.google.com/m8/feeds/contacts/default/full) only pulls contacts in my 'My Contacts' group, and (2) when I look for my groups (through the interactive samples Google provides), 'Other Contacts' is not an available group to pull from.

This leads to a pretty terrible auto-complete experience: I've got about 100 'My Contacts' members, compared to 3,000 contacts in 'Other Contacts'; I can only imagine that other Gmail users are in roughly the same boat.

I've looked around the interwebs, but haven't found much:

So far, my backup is just asking for username/password and scraping (or using IMAP). Is there a better way out there?

Poppied answered 8/7, 2011 at 0:50 Comment(3)
Also posted on the relevant board: code.google.com/apis/contacts/community/…Poppied
I'm having exactly the same problem right now and it's definitely not related to the 'first page only' issue. Did you have to change anything else in your code to show contacts from 'Other Contacts' folder?Meir
(1) the http://www.google.com/m8/feeds/contacts/default/full contacts pull containing Contacts and Other Contacts groups by default, not only Contacts.Ensile
T
1

For (1), are you sure you're getting "My Contacts" and not just the first page of results for "All Contacts"? From http://code.google.com/apis/contacts/docs/3.0/developers_guide_protocol.html: "Note: The feed may not contain all of the user's contacts because there's a default limit on the number of results returned. For more information, see the max-results query parameter in Retrieving contacts using query parameters."

For (2), https://mail.google.com/support/bin/answer.py?hl=en&answer=97952, which you linked to, says "Other Contacts includes any contacts that haven’t already been categorized into My Contacts or another contact group." In other words, it doesn't show up because the group doesn't really exist.

Tyrontyrone answered 11/7, 2011 at 5:52 Comment(1)
Thanks. It looks like the problem has gone now (though see the code.google.com discussion above as well), but yes - if it comes back, I'll implement paging using 'next' properly.Poppied

© 2022 - 2024 — McMap. All rights reserved.