DEV Community

Cover image for How To Integrate Google Calendar API with Laravel
Denis Sinyukov
Denis Sinyukov

Posted on • Updated on • Originally published at coderden.dev

How To Integrate Google Calendar API with Laravel

Many applications need to integrate their application with Google or Outlook calendars. Reasons can be different, such as obtaining free dates for scheduling appointments in CRM or combining several calendars in one application, and others.

Introduction

If you have experience with PHP and Laravel you can easily do it.

This article gives you a basic understanding of how Google API works, useful source code and a step-by-step guide on how to integrate Google calendar into your application and set up synchronization.

Enabling Google API

  1. Go to the Google API Console.
  2. Select an existing project from the projects list, or click NEW PROJECT to create a new project. create a new project
  3. Select the newly created project and ENABLE to the Google Calendar API in APIs & Services section.
  4. Сreate a key pair by clicking Create credentials by type OAuth Client ID. Create credentials
  5. Once created, you will receive an Client ID and Client Secret. Save client_secret_*.json file, as you will need them later.
  6. Add a test user . Google says

While publishing status is set to "Testing", only test users are able to access the app. Allowed user cap prior to app verification is 100, and is counted over the entire lifetime of the app.

Add a test user to access

Conclusion

This concludes the first part of our integration. In the next article we will create an application that will authenticate with OAuth 2 and retrieve & sync calendars.

See you soon ..

Related links:

Top comments (0)