PHPackages                             addin/google-people - 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. addin/google-people

ActiveLibrary[API Development](/categories/api)

addin/google-people
===================

Manipulasi kontak Google (People API)

v1.0.1(10mo ago)06MITPHP

Since Jul 8Pushed 10mo agoCompare

[ Source](https://github.com/rwaddin/google-peoples)[ Packagist](https://packagist.org/packages/addin/google-people)[ RSS](/packages/addin-google-people/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

📇 Google Contacts Manager (PHP Package)
=======================================

[](#-google-contacts-manager-php-package)

Package sederhana untuk manipulasi kontak Google menggunakan People API. Mendukung:

- 🔐 Login Google (OAuth2) sekali
- 📖 Baca (read) daftar kontak
- ➕ Tambah kontak
- 📝 Update kontak
- ❌ Hapus kontak
- 🔁 Refresh token otomatis (tanpa login ulang)

---

📦 Instalasi
-----------

[](#-instalasi)

Tambahkan ke proyek kamu via Composer:

```
composer require addin/google-contacts
```

🔧 Setup Awal

1. Aktifkan Google People API
    - Buka Google Cloud Console
    - Buat atau pilih project
    - Aktifkan People API
    - Buat kredensial OAuth 2.0 Client ID (application type: Desktop app)
    - Unduh credentials.json
2. Pertama Kali Login &amp; Simpan Token Jalankan perintah berikut:

```
php -S localhost:8080 example/authorize-server.php
```

buka di browser

atau bisa juga membuat authorize script sendiri dengan mencontoh file /example/authorize-server

- Script ini akan:
- Menampilkan URL untuk login ke Google
- Meminta kode verifikasi
- Menyimpan token akses ke token.json

🚀 Contoh Pemakaian Inisialisasi

```
use Addin\GoogleContactsManager;

require 'vendor/autoload.php';

// Inisialisasi dengan file token
$contacts = new GoogleContactsManager('credentials.json','token.json');
```

📖 Baca Kontak

```
$list = $contacts->listContacts(10);
foreach ($list as $person) {
    echo $person->getNames()[0]->getDisplayName() . PHP_EOL;
}
```

➕ Tambah Kontak

```
$contacts->addContact('John Doe', 'john@example.com');
```

📝 Update Kontak

```
$contacts->updateContact($resourceName, 'Nama Baru', 'emailbaru@example.com');
```

❌ Hapus Kontak

```
$contacts->deleteContact($resourceName);
```

Menggunakan Inisialisasi pakai method `getService()`

```
$contact->getService()->whatever()->method()->google();
```

⚠️ Catatan

- Token akan otomatis direfresh jika access token expired
- Jangan upload credentials.json dan tokens/\*.json ke GitHub (gunakan .gitignore)
- Jika token dicabut oleh user atau Google, harus login ulang (php auth-google.php)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance58

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity37

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

Every ~0 days

Total

2

Last Release

304d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f15a137ef8f5a0189226cbed78cb564597a62a8fdc5248fe1858a0910857a1c2?d=identicon)[addin](/maintainers/addin)

### Embed Badge

![Health badge](/badges/addin-google-people/health.svg)

```
[![Health](https://phpackages.com/badges/addin-google-people/health.svg)](https://phpackages.com/packages/addin-google-people)
```

###  Alternatives

[revolution/laravel-google-sheets

Google Sheets API v4

4483.1M6](/packages/revolution-laravel-google-sheets)[pulkitjalan/google-apiclient

Google api php client wrapper with Cloud Platform and Laravel support

2582.9M5](/packages/pulkitjalan-google-apiclient)[dacastro4/laravel-gmail

Gmail API package for Laravel

312382.9k1](/packages/dacastro4-laravel-gmail)[spotonlive/php-google-my-business

Google MyBusiness

31677.1k](/packages/spotonlive-php-google-my-business)[happyr/google-api-bundle

A Symfony2 Wrapper for the Google APIs Client Library for PHP

48196.1k](/packages/happyr-google-api-bundle)[mediafigaro/google-analytics-api-symfony

Google Analytics API v4 Symfony

46177.7k](/packages/mediafigaro-google-analytics-api-symfony)

PHPackages © 2026

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