Google My Business provides a fast and easy way for businesses, products, brands, artists, and organisations to manage their online presence with Google.

The Google My Business API is a programming interface that allows developers to write applications to manage Google My Business account and location data.

The Google My Business API allows merchants or their representatives to manage how their data is presented across Google and who co-manages their data. User-created data can be managed through the API, including owner photos and reviews.

google my business api

Requirements

Google My Business - API Reference

The Google My Business API provides an interface for managing business location information on Google. Check API Reference for available REST Resources.

Setup and Installation

Enable the Google My Business API

The Google My Business API doesn't appear in the following steps until your project has been whitelisted. The API is only visible in Google API Console to the users whose Google Accounts were submitted in the access request form.

How to use the Google My Business API client

Example:

$gmbService = \Drupal::service('google_mybusiness_api.client');

try {
  $accounts = $gmbService->googleServiceMyBusiness->accounts->listAccounts();
  // ksm($accounts);
}
  catch (Exception $e) {
  // ksm($e);
}

Related Modules

  • Google API PHP Client
    Google APIs give you programmatic access to Google Maps, Google Drive, YouTube, and many other Google products.
  • Google My Business API
    Google My Business provides a fast and easy way for businesses, products, brands, artists, and organisations to manage their online presence with Google.
  • Google Photos API
    Using the Google Photos Library API your app can read, write and share photos and videos in Google Photos.

Project information

Releases