List all places under my business api[ Edited ]
June - last edited June by Shalini S
I am trying to get list of locations from my business API, but I am
not sure about the way even after searching a documentation.
I am using PHP client from that site
(https://developers.google.com/my-business/samples/ ) and
credential I have got when I was creating business api account.
The problem is that I can see only one account after calling a list
method - that is the API account and it does not have any stores under it.
Call source code:
$googleClient = new Google_Client(); $googleClient->useApplicationDefaultCredentials(); $googleClient->addScope("https://www.googleapis.com/auth/plus.business.manage");
$googleBusiness = new Google_Service_MyBusiness($googleClient);
$result = $googleBusiness->accounts->listAccounts();
it returns ListAccountsResponse object which contains only one
Dumped account object:internal_gapi_mappings protected => array () accountName => NULL name => "accounts/105154061200768320715" (30) role => NULL stateType protected => "Google_Service_MyBusiness_AccountState" (38) stateDataType protected => "" type => "PERSONAL" (8) modelData protected => array (1) state => array (1) status => "UNVERIFIED" (10) processed protected => array ()
Please, tell me if there is some stuff I need to do, so this API
account can see all the locations stored in My Business.