Page tree
Skip to end of metadata
Go to start of metadata

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.

  1. Go to the Google Cloud console at https://console.cloud.google.com.
  2. Make sure you are logged in with the correct account.
  3. 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.
  4. With the project active, choose 'APIs & Services' from the menu.
  5. Click 'Enable APIs & Services'.
  6. Search for 'Calendar' and choose 'Google Calendar API'.
  7. 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.

  1. Go to the Google Cloud console at https://console.cloud.google.com.
  2. Make sure the 'MyTimetable' project is active.
  3. In the menu, choose 'APIs & Services' > 'Credentials'.
  4. Choose 'OAuth consent screen'.
  5. Choose 'Internal' as application type.
  6. Set 'MyTimetable' as application name.
  7. Upload a logo. You can find a MyTimetable logo here: https://dl.eveoh.nl/MyTimetable-google_logo.png
  8. Fill in your top-level domain (e.g., 'university.ac.uk') as authorised domain. Do not forget to press enter to save the domain.
  9. 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.

  1. Go to the Google Cloud console at https://console.cloud.google.com.
  2. Make sure the 'MyTimetable' project is active.
  3. In the menu, choose 'APIs & Services' > 'Credentials'.
  4. Choose 'Create credentials' > 'OAuth client ID'.
  5. Choose 'Web application'.
  6. Enter the domain of your application in the 'Name' box (e.g., mytimetable.university.ac.uk).
  7. 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
  8. Do not forget to press enter to save the domain.
  9. Choose 'Create'.
  10. 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

  1. Go to the Google Cloud console at https://console.cloud.google.com.
  2. Make sure the 'MyTimetable' project is active.
  3. In the menu, choose 'APIs & Services' > 'Credentials'.
  4. Choose 'Domain verification'.
  5. 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.
  6. Choose 'OAuth consent screen'.
  7. Choose 'Public' as application type.
  8. Fill in the MyTimetable URL or another URL describing your MyTimetable application at 'Application Homepage link'.
  9. Choose 'Add scope' and find the 'Google Calendar API' entry with scope '../auth/calendar'. Add that scope.
  10. 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/
  11. 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.
  • No labels