Sync Classeviva agenda with Google Calendar
- PHP 7 or newer
- Composer
- A Classeviva account
- A Google Calendar-enabled API secret
- Go to the Google Developers Console
- Create a project (call it however you want)
- Go to credentials and create a new OAuth client (type: other)
- Save the JSON in the ClassevivaSync folder
Now that you have the APIs credentials you must grant access to the APIs to Google Calendar. To do this you have to go here and enable it
Clone the repository in your server via
git clone https://github.com/Knocks83/ClassevivaSync.git
and install the Google APIs via
composer install
- (Optional) Set working mode (whether to delete events that aren't in the Classeviva Calendar)
- (Optional) If the strict mode is enabled, you can choose to ignore whether an empty response from Classeviva would delete every event or not (since lately Classeviva has been giving empty responses due to overload this should fix it)
- (Optional) Change log position/Set debug log position
- Set classeviva Username/email and password
- (Optional) If you login via email and you have more than one accounts linked to the same email you must set a identity (the username of the account you want to use)
- Set the name of the Google APIs secret (the one you created before)
- (Optional) Set the calendar ID to your calendar (if you don't know what it is just leave it as "primary")
The first start must be made via CLI because it must give you a link to access your Google account. Start ClassevivaSync by doing
php run.php
I remind you that the Classeviva APIs I used in this project are available here