Reputation: 83
I'm working on a WebApp project which includes a system of Users. For each of these users I need a calendar of events that the user can interact with (CRUD operations). I wish to use the Google Calendar API to achieve this, however I'm uncertain about how to store the calendars for my users. The easiest way would be requiring the users to log in with a Google account, and creating a new Calendar for them. However this goes againsts requirements of the project since there is already a user system in place. What would be the best-practice way to implement this, without directly requiring users to log in with Google? The way I see it I have a couple of options:
My backend uses Java to make the API calls to Google Calendar.
Upvotes: 0
Views: 211
Reputation: 117254
Google calendar only supports service accounts if you have a google workspace account and can configure domain wide delegation. There is a limit to how many calendars a single user can have so assuming you create all the calendars for the users under a single user in your workspace domain. I don't think this is going to be a very robust solution in the long run your going to run out of calendars you can keep creating.
The best solution would be to have the users authorize your application to access their google calendar account and to create a calendar for them their. This will require write access to google calendar and will require you to go though the full google verification process for your application.
I question why you want to use google calendar at all and not just store the calendar data in your own system.
Upvotes: 0