How do I retrieve individual email addresses that are members of a Google Contact Group?
Using the API, I seem to be able to only see which contacts are members of a group - contacts that might have multiple email addresses. However, the Gmail UI lets me create a group with individual email addresses.
To repro: 1) Open https://mail.google.com/mail/u/0/#contacts 2) Create a new contact called John Smith with two email addresses: jsmith@gmail.com and jsmith@work.com 3) Create a new contact group call "my group". Add (only) jsmith@work.com to that group. 4) Now use the Google Contacts v3 API to fetch John Smith's record. It will look like this:
'gd$name': { 'gd$fullName': { '$t': 'John Smith' }, ... },
'gd$email':
[ { address: 'jsmith@gmail.com',
primary: 'true',
rel: 'http://schemas.google.com/g/2005#other' },
{ address: 'jsmith@work.com',
rel: 'http://schemas.google.com/g/2005#work' } ],
'gContact$groupMembershipInfo':
[ { deleted: 'false',
href: 'http://www.google.com/m8/feeds/groups/engtestuser%40mixmax.com/base/6' },
{ deleted: 'false',
href: 'http://www.google.com/m8/feeds/groups/engtestuser%40mixmax.com/base/2a44002d89eb51e3' } ] }
How do I know that only jsmith@work.com was added to "my group" (with id 2a44002d89eb51e3)? Where is the association between email addresses and groups stored?