PHPackages                             ashus/google-addressbook - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. ashus/google-addressbook

ActiveRoundcube-plugin[Utility &amp; Helpers](/categories/utility)

ashus/google-addressbook
========================

Lets you sync your Google Addressbook in readonly mode with Roundcube.

1.2.2(2y ago)31.1k↓60%1GPL-3.0+PHPPHP &gt;=7.0

Since Jun 2Pushed 2y ago3 watchersCompare

[ Source](https://github.com/Ashus/google_addressbook)[ Packagist](https://packagist.org/packages/ashus/google-addressbook)[ Docs](https://github.com/Ashus/google-addressbook)[ RSS](/packages/ashus-google-addressbook/feed)WikiDiscussions master Synced today

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

Google Addressbook Plugin for Roundcube
=======================================

[](#google-addressbook-plugin-for-roundcube)

This plugin lets you sync your Google Addressbook in readonly mode with Roundcube.

*Info: Initially stwa created this plugin for Roundcube 0.8.5, but it is still working properly with the current version of Roundcube (version 1.6.0). So yes, you can still use this plugin, it's up to date!*

Requirements
------------

[](#requirements)

- Roundcube &gt;= v0.8.5 \[\]
- PHP 7.0 or higher \[\]
- PHP Curl extension \[\]
- PHP JSON extension \[\]

Installation
------------

[](#installation)

Use Composer 2 for installation.

Run `composer require ashus/google-addressbook`.

*Do not forget to create the database table using the SQL from SQL/*

Command Line
------------

[](#command-line)

It is possible to sync the addressbooks via command line.
To do this, you just have to run the script "sync-cli.sh".
This syncs the addressbooks of all users who have enabled google addressbook plugin in their settings.

You can also use crontab to sync the addressbooks periodically.
Just specify an entry like:
0 \*/4 \* \* \* /path/to/roundcube/plugins/google\_addressbook/sync-cli.sh
(Every 4 hours in this example)

Own Google Application
----------------------

[](#own-google-application)

You need to register your plugin with Google to customize the application name that is presented to users when requesting access to contacts. For this, you have to register at  and create a project for your roundcube installation. After enabling OAuth 2.0 Client ID credentials, you would get an application name, a client id and a secret. Ensure to allow redirect to `https://your-rc-base..../?_task=settings&_action=plugin.google_addressbook.auth` when you create the Web Application credential and also store this to `google_addressbook_client_redirect_url`. Alternatively you can create an Other credential, but then disable `google_addressbook_client_redirect`. Anyhow remember to enable **Google People API** for that project. Put all these values in a file named `config.inc.php` inside the `config` folder like this:

```
