0
votes

We are using Google calendar APIs to sync my events on Google Calendar. we used Google Calendar create api to push events on calendar by using sample code:

*

event = {
  'summary': 'Google I/O 2015',
  'location': '800 Howard St., San Francisco, CA 94103',
  'description': 'A chance to hear more about Google\'s developer products.',
  'start': {
    'dateTime': '2015-05-28T09:00:00-07:00',
    'timeZone': 'America/Los_Angeles',
  },
  'end': {
    'dateTime': '2015-05-28T17:00:00-07:00',
    'timeZone': 'America/Los_Angeles',
  },
  'recurrence': [
    'RRULE:FREQ=DAILY;COUNT=2'
  ],
  **'attendees': [
    {'email': '[email protected]'},
    {'email': '[email protected]'},
  ],**
  'reminders': {
    'useDefault': False,
    'overrides': [
      {'method': 'email', 'minutes': 24 * 60},
      {'method': 'popup', 'minutes': 10},
    ],
  },
}
event = service.events().insert(calendarId='primary', body=event).execute()

Problem Statement: In above code how we can authenticate 'attendees' emails where we need to push event on attendees calendar. How we can check the its an valid Gmail account? is there any APIs for the same to authenticate emails?

Currently, api reposed successfully and Failure email received on developer account email.
How we can get this error on our code end to handle email authentication failure?

1

1 Answers

0
votes

How we can check the its an valid Gmail account? is there any APIs for the same to authenticate emails?

Answer:

Honestly, there is just no way you can do this.

More Information:

Pretty much anything in the form [email protected] can be an email address as long as yyy is a domain name and zzz is a valid top level domain.

Google also does not provide a way of checking to see if an email exists - aside from attempting to create an account with the email address you want to check. This I can imagine is for security and anti-spam measures.

The only thing you can do is wait for that failure notification. By sending an email to the attendee's email address, you can soon discover if the email is valid or not... by receipt of the "Postmaster failed to send" email.