0

I'm doing a small app juggling with calendars and I'd love to send invitations to my user's contacts.

I'm wondering, is there a way (even complicated, I don't mind) which would allow me to know whether a particular contact uses Google Calendar or not, so I could send them plain e-mail invitation or full-featured Google Calendar invitation (which they are familiar with and can respond to them with one click from Gmail)?

  • Input: Contact's e-mail address. (e.g. steve.jobs@apple.com, my.mom@gmail.com, ...)
  • Output: Boolean information "does this contact use Google Calendar?"
    • subtask: Boolean information "does this contact even use Google apps?"

It's more or less possible to solve the subtask. Google uses two domains that directly yell at programmer "we are from Google!!!", that's gmail.com and googlemail.com (second one used in UK and Germany due to some legal restrictions). In Python, it's this simple:

def uses_google(email):
    return email.endswith(('gmail.com', 'googlemail.com'))

Well, then there are Google Apps. Anyone can run them on his own domain. This should (as far as OpenID is properly installed) solve answer to this question: How to detect if an email is a Google Account?

But what about the usage of Google Calendar?

And is it even necessary to solve such problem? What happens if I send invitations to e-mails without any connection to Google Calendar? Something tells me it wouldn't be nice (maybe only notice "Honza sent you invitation, start using Google Calendar if you'd like to respond"). As a user of the Calendar I know when someone sends invitation to me on wrong e-mail, I can't even respond to it.

Community
  • 1
  • 1
Honza Javorek
  • 8,566
  • 8
  • 47
  • 66

1 Answers1

0

A lot of questions here, but I'll take a crack at this.

First off, using Google's mail service doesn't guarantee that the owner use other Google services. Yes, you can assume they have access and they'll be able to accept an invitation, but it doesn't mean they use it as their calendar.

As for somehow gleaning information about Google services used based on a non-Google email address, this does not seem possible. This information is private between the customer and Google, and also borders on proprietary to Google I imagine.

patrickn
  • 2,501
  • 4
  • 22
  • 21