0

I was creating new google calendar event using google calendar API through service account email in c#. I succeeded in creating the event but the invitation mail I received has service account email address as 841212832218-vaqgheuempaamjpprglaa9d36q55gq7a@developer.gserviceaccount.com instead of the actual gmail id as rags1.2@gmail.com. Could you please let me know anybody has the solution for this.

Thanks

Gerardo
  • 3,460
  • 1
  • 16
  • 18
  • I think you have to be logged with your gmail account. the service account is the account related to the application. It can be used to manage application specific information. So in this case as you are logged with that account, is correct that the invitation comes from that email. – Gerardo Sep 09 '15 at 22:15
  • If you want to use the service account to impersonate a user and act on it's behalf, this can be achieve only for Domain accounts through "Domain wide delegation" https://developers.google.com/drive/web/delegation – Gerardo Sep 09 '15 at 22:18
  • Hi Gerado, Thanks for you reply. My concern here is the that I am able to create google event and when I saw the calendar invite in my inbox from address shown as service account email. I need that to be with actual gmail id so that people can recognize the calendar invite. – Rgahavendra Sep 14 '15 at 09:39
  • Oh, ok. So in order to do that, you have to login with your gmail account to your application using the normal OAuth 2 path (Three legged Oauth). https://developers.google.com/identity/protocols/OAuth2InstalledApp Creating the event in this way, the event will be yours and the emails will come from your account. – Gerardo Sep 14 '15 at 18:45
  • Hi Gerardo, I wanted it with service account email authentication itself. Is there any way in the vent settings we can mention the email id. – Rgahavendra Sep 16 '15 at 10:55
  • No that I know, at least no with gmail accounts. As I mentioned, you can use service account to "impersonate" users in a domain, only if the admin granted access to the service account and if also domain wide delegation of authority is also granted. check this documentation: https://developers.google.com/identity/protocols/OAuth2ServiceAccount – Gerardo Sep 16 '15 at 16:14
  • @Rgahavendra were you able to figure this out? any workaround or solution to this? – Meer Aug 04 '16 at 03:03

0 Answers0