Currently I am building a react new app which is using a React.js front-end.
In the React front-end app there is the ability to plan in an appointment.
These appointments should be added to a Strapi collection type called “Appointments”. This works as expected with the build in tools from Strapi.
However, besides that it creates a collection type, it should also create a new event in the Google-Calendar of the Strapi admin. (main account)
What is the best way to enable creation of Google Calendar events with the official google-api from the back-end in Strapi when a collection type “appointment” is created?
If I was you, I will create a custom plugin ( Calendar sync ) where you can add deferent calendar connections similar to providers in Settings.where you add google with a pen icon you click on it to add authentication config
In the plugin controllers you create functions ( add/cancel/edit event on calendar ) where you loop throw the calendar providers and execute the api requests ( Google api endpoints)
and then you call this controllers in the appointments create controllers/services depending on your need
P.S: It seems interesting what you creating , are you creating booking system using Strapi as BE and reactJs FE, I am planning to do something similar soon
I would suggest to you to use service account credentials, it is much more efficient to authnticate between BE and google API, specially as it is not deferent accounts( users ) what you need to authenticate to
What is your tag code in discord?
No I need the logged in strapi user to connect to it’s google calendar, so I can obtain a access token to send api request with.