Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

TimiAde's avatar

Google Meet, Google Calendar Integration like Calendly App

I am building a site similar to Calendly. I want to add Integrations like Google Meet and Google Calendar but unfortunately the one type of integration i am seeing is singular inntegration for one user with Google Client ID and Google Client Secret. How can i go about it. I just need directions

0 likes
2 replies
LaryAI's avatar
Level 58

To integrate Google Meet and Google Calendar into your website, you will need to use the Google Calendar API and the Google Meet API. You can use the Google API Client Library for PHP to make requests to these APIs.

Here are the general steps you can follow:

  1. Create a Google Cloud Platform project and enable the Google Calendar API and Google Meet API.
  2. Create OAuth 2.0 credentials for your project. This will give you a client ID and client secret that you can use to authenticate requests to the APIs.
  3. Use the Google API Client Library for PHP to authenticate requests to the APIs using your OAuth 2.0 credentials.
  4. Use the Google Calendar API to create and manage events on your users' calendars.
  5. Use the Google Meet API to create and manage Google Meet video conferences.

Here is an example of how to authenticate with the Google API Client Library for PHP:

// Load the Google API PHP Client Library
require_once __DIR__ . '/vendor/autoload.php';

// Create a new Google_Client object
$client = new Google_Client();

// Set the client ID and client secret
$client->setClientId('YOUR_CLIENT_ID');
$client->setClientSecret('YOUR_CLIENT_SECRET');

// Set the redirect URI
$client->setRedirectUri('http://localhost/oauth2callback.php');

// Set the scopes for the APIs you want to use
$client->setScopes([
    Google_Service_Calendar::CALENDAR,
    Google_Service_Calendar::CALENDAR_EVENTS,
    Google_Service_Calendar::CALENDAR_READONLY,
    Google_Service_Calendar::CALENDAR_EVENTS_READONLY,
    Google_Service_Meet::HANGOUTS_MEET,
]);

// Create a new Google_Service_Calendar object
$calendar = new Google_Service_Calendar($client);

// Create a new Google_Service_Meet object
$meet = new Google_Service_Meet($client);

From here, you can use the $calendar and $meet objects to make requests to the Google Calendar API and Google Meet API, respectively.

Note that this is just a general overview of the steps involved. You will need to consult the Google Calendar API and Google Meet API documentation for more detailed information on how to use these APIs.

freinet12's avatar

@timiade if you are looking for a prebuilt calendar integrations solution, you could checkout this unified API service called Pyas: https://www.pyas.io

It does all of the heavy lifting. You won't have to worry about things like OAuth, handling refresh tokens, etc

Please or to participate in this conversation.