1
votes
  1. In Google Contacts you can create a group.
  2. You assign contacts to the group.
  3. You go to Google Calendar, create a new event add the Group as guests (which adds them as attendees).
  4. If you query the event using Google Calendar Api V3 you can get a list of attendees but the only data is DisplayName, Email and ResponseStatus.

Question: Is there no way to match up the attendees of a Calendar event with your google contacts? You could match using DisplayName and Email or combination of both but that will be prone to error.

1
Not 100% sure I understand the question: If the user has authenticated you to access there google contacts then yes you could compare the contacts with the attendees.DaImTo
I only get name and email. There is nothing to guarantee those are unique.Skiltz
I eventually want to get the mobile number for the contact.Skiltz

1 Answers

1
votes

Google Calendar events.get returns an events resource

an event resource only contains the following information about an attendee

"attendees": [
    {
      "id": string,
      "email": string,
      "displayName": string,
      "organizer": boolean,
      "self": boolean,
      "resource": boolean,
      "optional": boolean,
      "responseStatus": string,
      "comment": string,
      "additionalGuests": integer
    }
  ],

The Google Contacts api is an old Gdata api, that being said its very limited to what you can do with it. I am not even sure if you can search on them or if you just get a full list of all of a users contacts back Contacts.Getcontacts in which case you are just going to have to scan though them yourself.

If you are looking for more information on the person in question a crazy idea would be to try the People.search method in the Google+ api. If you where to say search on the name of the person, get a list back of all the people matching that persons name if you are lucky they have email public you could then match the email to that. However this will only work if the person in question has their email address set to public.

Could you try and describe a bit in your question exactly what it is you are trying to achieve with this?