The first thing you’ll need to do is get credentials to use Google's API. I’m assuming that you’ve already created a Google account and are signed in. Head over to Google API console and click "Select a project" in the header.



Create a new project if you don’t have any project


Next Enter Your Project Name and Click on Create

Next up we must specify which APIs the project may consume. From the header, select "Enable APIs and Services".

On the next page, search for "Calendar" and select "Google Calendar API" from the list.


From here, press "Enable" to enable the Google Calendar API for this project.

Next Switch to APIs & Services 

Here Select OAuth consent screen

Select External and press "Enable"


Fill your application information and press "Save and Continue"

Screenshot at Jul 19 17-50-51

On the next page, press “Add or Remove Scopes”

In Filter Enter “API:Google Calendar API” and Select All Google Calendar API scopes. after selecting APIs press “Update” Button and then press "Save and Continue"

In this step you can add testing user if you want to test your application until your app not published by google after adding test users press "Save and Continue"

Here You can check your submitted details of your application if everything ok press "Back to Dashboard"

Screenshot at Jul 19 17-53-07

Now press "Publish App"

Picture1 (1)


Here You need to complete verification process to do that press “Confirm”

Picture2

In this step you need to press “Prepare for Verification” and submit some details in Scopes because we are using some user’s data from Google Calendar APIs.

Screenshot at Jul 19 17-59-29


Now go on Credentials

Screenshot at Jul 19 18-00-18



Now press “Create Credentials”


Select OAuth client ID


Select Application type “Web application”

Enter a name of OAuth client ID and add Authorized redirect URIs after filling the details press “Create”
Your Authorized redirect URIs is <YOUR_APP_URL>/google-auth

Screenshot at Jul 19 18-06-47


Now you get “Your Client ID” and “Your Client Secret”

In Admin Dashboard you need to enter you “Your Client ID” and “Your Client Secret”

Screenshot at Jul 19 12-58-46

Now your application ready for Google Calendar 

Screenshot at Jul 19 13-00-32



Every user can enable or disable Google Calendar Sync according to module by their profile update.