My Business
5.4K members online now
5.4K members online now
For developers who are using the Google My Business API to manage locations
Guide Me
star_border
Reply

/v3/accounts shows only a personal account

[ Edited ]
Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I use the OAuth 2.0 Playground for the project named "LunchgateMyBusiness"

The URI /v3/accounts lists only the account 114563392256128583154 with type PERSONAL.

Our Business Account is 116174323307077702489

When I try /v3/accounts/116174323307077702489/admins, that works fine, shows all registered admins.

 

1. Why the Business account is not listed in /v3/accounts?

 

I try /v3/attributes?languageCode=CH

2. Why the answer is empty?

 

Thanks, Hans

1 Expert replyverified_user

Re: /v3/accounts shows only a personal account

Google Employee
# 2
Google Employee

Hi @Hans E,

 

1. I’ve checked in our internal system that your business account with the account_name 116174323307077702489 may have been deleted. There’s one verified listing in your personal account. If you are able to list the admins for the specified business account, you should be able to list all accounts under your Google Account including that particular business account. I suggest you add a new business account in the UI and test if you can list all accounts including the newly added business account.

 

2. I notice that you didn’t specify a categoryId and country for listing attributes that would be available for a location with the given primary category and country. Please note that a location with the given primary category and country may not have a list of available attributes.

 

The following is an example with the correct format for listing available attributes for a location with the given primary category and country:

https://mybusiness.googleapis.com/v3/attributes?categoryId=gcid:american_restaurant&country=US&languageCode=en-US

 

Thanks,

Terry

Re: /v3/accounts shows only a personal account

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
Hi Terry

Thankyou for the answer.

1. The business account is not deleted:
https://plus.google.com/+LunchgateAGZ%C3%BCrich
https://plus.google.com/116174323307077702489

When I use the playground as hans.egg@lunchgate.com (manager of 116174323307077702489), the answer is
{
"accounts": [
{
"state": {
"status": "UNVERIFIED"
},
"type": "PERSONAL",
"name": "accounts/103482333103554072232",
"accountName": "Hans Egg"
}
]
}

When I'm logged in as office@lunchgate.com (owner of 116174323307077702489), the answer is
{
"accounts": [
{
"state": {
"status": "UNVERIFIED"
},
"type": "PERSONAL",
"name": "accounts/114563392256128583154",
"accountName": "Lunchgate"
}
]
}

in both cases the answer of /v3/accounts/116174323307077702489/admins
lists the owner and all defined managers

2. The second question ist answered.

Thanks for the additional assistance
Hans

Re: /v3/accounts shows only a personal account

[ Edited ]
Google Employee
# 4
Google Employee

Hi @Hans E,

 

116174323307077702489 is the userId of the associated Google+ page for your verified location in Google My Business, and is not for a business account. I suggest you read more about the best practices for using Business Accounts with Google My Business locations in the FAQ.

 

In your case, the account_name should be 103482333103554072232. The following is the correct GET request format for listing all of the locations for the specified account:

https://mybusiness.googleapis.com/v3/accounts/account_name/locations

 

Once you have the locationId of your verified location, you can use the following correct GET request format for listing the admins for the specified location:

https://mybusiness.googleapis.com/v3/accounts/account_name/locations/locationId/admins

 

Thanks,

Terry

Re: /v3/accounts shows only a personal account

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭
Hi I'am back … and I'am a little confused!

1. 116174323307077702489 seems to be our business account:

/accounts/116174323307077702489/locations
returns all info about our location (there is only 1 with ID 11662609119296499661)

/accounts/116174323307077702489/locations/11662609119296499661/admins
returns all admins, this is the same result as
/accounts/116174323307077702489/admins


2. 103482333103554072232 is not found
/accounts/103482333103554072232/locations
and
/accounts/103482333103554072232/admins
both returns 404 "Requested entity was not found."


3. 114563392256128583154 seems to be a personal account
/accounts
returns type PERSONAL
accounts/114563392256128583154

and then I try this:
accounts/114563392256128583154/locations
the answer is the same as
accounts/116174323307077702489/locations

and now this:
/accounts/114563392256128583154/locations/11662609119296499661/admins
the answer is the same as
/accounts/116174323307077702489/locations/11662609119296499661/admins

What a mess!

Thanks, Hans

Re: /v3/accounts shows only a personal account

[ Edited ]
Google Employee
# 6
Google Employee

Hi @Hans E,

 

I've taken another look at your personal account in a Google Account with account_name 114563392256128583154 in our internal system, and 116174323307077702489 is indeed your verified location’s plusPageId, which is the Google+ page ID for the associated Google+ page of this location. You currently do not have a business account created under this Google Account. 11662609119296499661 is the locationId of your verified location.

 

You can verify this by using OAuth 2.0 Playground to send the following GET request to get the specified location:

https://mybusiness.googleapis.com/v3/accounts/114563392256128583154/locations/11662609119296499661

 

116174323307077702489 will appear in the plusPageId field of the LocationKey object for the returned Location object in the JSON response body. Please note that the Google+ page ID that appears in the URL for the associated Google+ profile of your verified location is not equivalent to the account_name of a personal account or a business account. The Google+ page ID and account_name are not interchangeable for any supported operations in the Google My Business API.

 

103482333103554072232 is the account_name for the personal account in another separate Google Account. You need to be signed in with that particular Google Account while making requests with OAuth 2.0 Playground to access the Google My Business data in that separate Google Account.

 

I hope this clears things up for you.

 

Thanks,

The Google My Business API team