PHPackages                             bronhy/google-my-business-php-client - 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. bronhy/google-my-business-php-client

ActiveLibrary[API Development](/categories/api)

bronhy/google-my-business-php-client
====================================

Google My Business

v4.9(5y ago)23118.8k↓22.3%11Apache-2.0PHPPHP &gt;=5.4

Since Jan 20Pushed 3y ago4 watchersCompare

[ Source](https://github.com/bronhy/google-my-business-php-client)[ Packagist](https://packagist.org/packages/bronhy/google-my-business-php-client)[ Docs](https://github.com/bronhy/google-my-business-php-client)[ RSS](/packages/bronhy-google-my-business-php-client/feed)WikiDiscussions master Synced 1mo ago

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

PHP Client library for Google My Business
=========================================

[](#php-client-library-for-google-my-business)

The Google My Business API client libraries wraps the functionality of the Google My Business API, and provide functionality common to all Google APIs, for example HTTP transport, error handling, authentication, JSON parsing, and support for protocol buffers.

This package contains the Service definition for MyBusiness and it depends on Google API PHP Client

You are welcome to contribute and ask for maintenance rights.

BIG NOTICE
==========

[](#big-notice)

Google is updating My Business API and exposing the new Service definitions in this library. . After the udpate is compleate this repository will be marked as DEPRECATED.

Requirements:
-------------

[](#requirements)

Google API PHP Client URL:

How to install
--------------

[](#how-to-install)

The easiest way to install is with composer.

`composer require bronhy/google-my-business-php-client`

Semantic Versioning
-------------------

[](#semantic-versioning)

Do notice that google is not following semantic versioning RFC  with this library. Since this package reflects the google versioning make sure that you lock to your version.

```
ie. composer require bronhy/google-my-business-php-client:4.8

```

Configure with Symfony framework
--------------------------------

[](#configure-with-symfony-framework)

```
# config/services.yaml

parameters:
    app.google_credentials: '%env(json:base64:GOOGLE_CREDENTIALS)%' # exported json base64 encoded
    app.client_scope: 'https://www.googleapis.com/auth/plus.business.manage'
    app.redirect_url: '%env(GMB_REDIRECT_URI)%'

services:
    # default configuration for services in *this* file
    _defaults:
        autowire: true      # Automatically injects dependencies in your services.
        autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.

    Google_Client:
        class: Google_Client
        calls:
            - method: setAuthConfig
              arguments:
                  - '%app.google_credentials%'
            - method: addScope
              arguments:
                  - '%app.client_scope%'
            - method: setAccessType
              arguments:
                  - 'offline'
            - method: setRedirectUri # handy for local dev ie. https://localhost:8443/index.php
              arguments:
                  - '%app.redirect_url%'
            - method: setLogger
              arguments:
                      - '@monolog.logger'
        tags:
            - { name: monolog.logger, channel: google-api-php-client }

    Google_Service_MyBusiness:
        class: Google_Service_MyBusiness
        arguments: ['@Google_Client']
```

```
# HelloController.php
