To create a Google Calender OAuth token for MyTimetable, please follow the following steps.
Over time, the Google API console may change. If any of the steps are unclear, please contact us at support@eveoh.nl and we will be glad to help.
Step 1: create project and enable Google Calendar API
In this step, we will create a Google Developer/Cloud project that hosts MyTimetable. It is recommended to create a new project for this and the project should be under your Google Apps organisation.
- Go to the Google Cloud console at https://console.cloud.google.com.
- Make sure you are logged in with the correct account.
- Create a new project under your organisation, this can be done using the project dropdown next to the header logo/title. Name the project something like 'MyTimetable' and make sure this project is placed under your organisation.
- With the project active, choose 'APIs & Services' from the menu.
- Click 'Enable APIs & Services'.
- Search for 'Calendar' and choose 'Google Calendar API'.
- Click 'Enable'.
Step 2: setup consent screen
In this step, we will be setting up the OAuth consent screen the users see when linking their calendar to MyTimetable.
- Go to the Google Cloud console at https://console.cloud.google.com.
- Make sure the 'MyTimetable' project is active.
- In the menu, choose 'APIs & Services' > 'Credentials'.
- Choose 'OAuth consent screen'.
- Choose 'Internal' as application type.
- Set 'MyTimetable' as application name.
- Upload a logo. You can find a MyTimetable logo here: https://dl.eveoh.nl/MyTimetable-google_logo.png
- Fill in your top-level domain (e.g., 'university.ac.uk') as authorised domain. Do not forget to press enter to save the domain.
- Choose 'Save'.
Step 3: generate OAuth client credentials
We will now generate OAuth client credentials. Please repeat this process twice: once for your acceptance environment and once for your production environment. Use the domain of the respective MyTimetable instance instead of mytimetable.university.ac.uk
.
- Go to the Google Cloud console at https://console.cloud.google.com.
- Make sure the 'MyTimetable' project is active.
- In the menu, choose 'APIs & Services' > 'Credentials'.
- Choose 'Create credentials' > 'OAuth client ID'.
- Choose 'Web application'.
- Enter the domain of your application in the 'Name' box (e.g., mytimetable.university.ac.uk).
- Enter the following as 'Authorised redirect URIs', replacing the domain with your MyTimetable domain:
https://mytimetable.university.ac.uk/schedule?zoneview=0&ec_type=googlecalendar
- Do not forget to press enter to save the domain.
- Choose 'Create'.
- Copy the 'Client ID' and 'Client secret' and provide them to Eveoh in a secure way.
(Optional) Step 4: make your application public
This step is only necessary if you want to make your application available to Google accounts outside of your own Google Apps organisation. Please note that this process involves a manual review by Google. If your application is rejected for any kind of reason, that may mean you lose access to the Google Calendar API for your current project. More information about the verification process can be found at https://support.google.com/cloud/answer/9110914
- Go to the Google Cloud console at https://console.cloud.google.com.
- Make sure the 'MyTimetable' project is active.
- In the menu, choose 'APIs & Services' > 'Credentials'.
- Choose 'Domain verification'.
- Add your top-level domain (e.g., 'university.ac.uk') as authorised domain. You may need to verify your domain through Google Webmaster/Search Console first.
- Choose 'OAuth consent screen'.
- Choose 'Public' as application type.
- Fill in the MyTimetable URL or another URL describing your MyTimetable application at 'Application Homepage link'.
- Choose 'Add scope' and find the 'Google Calendar API' entry with scope '../auth/calendar'. Add that scope.
- Fill in a link to your Google Calendar integration privacy policy at 'Application Privacy Policy link'. This page should be on your own domain. A sample text can be found here: https://mytimetable.net/privacy-policy-google-calendar/
- Choose 'Save' and 'Submit for verification' and submit the consent screen for verification. This process may take a couple of days, and Google may request more information from you, including a YouTube video showing the OAuth flow.