1- First, you should activate the google API on this page:
2- create a Credential> OAuth client ID Select the option “Web Application”
3- Then you must configure the “OAuth consent screen” . (https://console.developers.google.com/apis/credentials/consent.)
4- Now we create an application of the type “Calendar”
5- Click on Google API, where we must enter the API code in OAurth Json Client.
6- Click on Run application.