PHPackages                             fares/google-meet-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. fares/google-meet-api

ActiveLibrary[API Development](/categories/api)

fares/google-meet-api
=====================

PHP library to interact with Google Meet API via Google Calendar API

v1.0.0(8mo ago)02MITPHPPHP &gt;=7.4

Since Sep 20Pushed 8mo agoCompare

[ Source](https://github.com/fareskhalid/google-meet-api)[ Packagist](https://packagist.org/packages/fares/google-meet-api)[ RSS](/packages/fares-google-meet-api/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

📖 Google Meet PHP Package
=========================

[](#-google-meet-php-package)

A simple PHP package to **generate Google Meet links** via the **Google Calendar API**.
This package handles **OAuth2 authentication**, token management, and event creation, returning the Google Meet link automatically.

---

🚀 Features
----------

[](#-features)

- 🔑 Handles **OAuth2 flow** (Google login).
- 💾 Supports **access &amp; refresh tokens** for long-term use.
- 📅 Creates Google Calendar events with Meet links.
- 🔗 Returns the **Google Meet link** directly.
- 🛠️ Easily extensible for listing/deleting events or adding attendees.

---

📦 Installation
--------------

[](#-installation)

Install via Composer:

```
composer require fares/google-meet-api
```

---

⚙️ Setup in Google Cloud
------------------------

[](#️-setup-in-google-cloud)

1. Go to [Google Cloud Console](https://console.cloud.google.com/).
2. Create a new project.
3. Enable the **Google Calendar API**.
4. Create **OAuth 2.0 Client Credentials** (Web Application).
5. Add your redirect URI (e.g. `https://yourapp.com/oauth2callback`).
6. Copy your **Client ID** and **Client Secret**.

---

📂 Package Structure
-------------------

[](#-package-structure)

```
src/
├── GoogleMeetClient.php   # Initializes Google Client
├── OAuthHandler.php       # Manages login, tokens, refresh
├── MeetGenerator.php      # Creates events and Meet links

```

---

🖥️ Usage Example
----------------

[](#️-usage-example)

### 1️⃣ Initialize Client

[](#1️⃣-initialize-client)

```
use Fares\GoogleMeet\GoogleMeetClient;
use Fares\GoogleMeet\OAuthHandler;

require 'vendor/autoload.php';

$client = new GoogleMeetClient("CLIENT_ID", "CLIENT_SECRET", "https://yourapp.com/oauth2callback");
$oauth = new OAuthHandler($client->getClient());

// Step 1: Redirect user to Google login
echo "Login with Google";
```

---

### 2️⃣ Handle Callback

[](#2️⃣-handle-callback)

```
// oauth2callback.php
use Fares\GoogleMeet\OAuthHandler;
use Fares\GoogleMeet\GoogleMeetClient;

require 'vendor/autoload.php';

$client = new GoogleMeetClient("CLIENT_ID", "CLIENT_SECRET", "https://yourapp.com/oauth2callback");
$oauth = new OAuthHandler($client->getClient());

if (isset($_GET['code'])) {
    $tokens = $oauth->fetchTokens($_GET['code']);
    file_put_contents('token.json', json_encode($tokens)); // Save securely (DB recommended)
    echo "Authentication successful!";
}
```

---

### 3️⃣ Generate a Google Meet Link

[](#3️⃣-generate-a-google-meet-link)

```
use Fares\GoogleMeet\MeetGenerator;

require 'vendor/autoload.php';

$client = new GoogleMeetClient("CLIENT_ID", "CLIENT_SECRET", "https://yourapp.com/oauth2callback");
$oauth = new OAuthHandler($client->getClient());

// Load saved token
$oauth->setAccessToken(json_decode(file_get_contents('token.json'), true));
$oauth->refreshTokenIfNeeded();

// Create meeting
$meet = new MeetGenerator($oauth->getClient());
$link = $meet->createMeeting(
    "Demo Meeting",
    "2025-09-20T10:00:00-07:00",
    "2025-09-20T10:30:00-07:00",
    "America/Los_Angeles"
);

echo "Google Meet Link: " . $link;
```

---

⚠️ Notes
--------

[](#️-notes)

- You must use `conferenceDataVersion=1` when inserting events, otherwise no Meet link will be generated.
- Tokens should be stored securely (preferably in a **database**, not `token.json`).
- Each user must log in once with Google to grant permission.

---

📌 Future Improvements
---------------------

[](#-future-improvements)

- ✅ Database token manager (MySQL, SQLite, etc.)
- ✅ Event management (list, update, delete).
- ✅ Support for adding participants automatically.

---

📜 License
---------

[](#-license)

MIT License. Free to use and modify.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance62

Regular maintenance activity

Popularity2

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

240d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/95ea4a45a11ecbcc51fb3b65647b40f1121acfe6bcd92a7df9e22b5c2fef78e5?d=identicon)[fareskhalid](/maintainers/fareskhalid)

---

Tags

phpgoogle apigoogle meetgoogle calendargoogle meet apigoogle meet link

### Embed Badge

![Health badge](/badges/fares-google-meet-api/health.svg)

```
[![Health](https://phpackages.com/badges/fares-google-meet-api/health.svg)](https://phpackages.com/packages/fares-google-meet-api)
```

###  Alternatives

[x-fran/g-trends

Google Trends API for PHP

11955.6k](/packages/x-fran-g-trends)[happyr/google-api-bundle

A Symfony2 Wrapper for the Google APIs Client Library for PHP

48196.1k](/packages/happyr-google-api-bundle)[tomshaw/google-api

A Laravel Google API Client.

591.5k](/packages/tomshaw-google-api)[sahusoftcom/youtube-livestream-api

PHP (Laravel) Package for Google / YouTube API of Video Live Streaming with Google Auth

451.1k](/packages/sahusoftcom-youtube-livestream-api)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
