AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

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

how to get Location ID for the locations created from GMB UI

[ Edited ]
Follower ✭ ☆ ☆
# 1
Follower ✭ ☆ ☆

Hi Team,

 

We have implemented GMB API to create new locations and save their Location ID in database.

 

We have already created and publsihed few locations using GMB UI for which we do not know location IDs. We would now like to sync the already existing locations that are created in GMB UI along with newly created locations via GMB API.

 

How to know location IDs for the already created stores via GMB UI?

 

We thought of cleaning the already existing stores which are created via GMB UI and create them again from GMB API. But as deleting a published store wont be actually deleting it from Google Maps, so we feel it might not be a feasable solution. Kindly suggest a solution for this.

 

Thanks and Regards,

bharath

2 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author anumula b
August 2016

Re: how to get Location ID for the locations created from GMB UI

Google Employee
# 2
Google Employee

Hi @anumula b,

 

Deleting your existing, verified business locations and creating them as new locations would require you to verify these locations all over again.

 

If your existing, verified business locations created via the UI are in a different Google Account from the one you are accessing the Google My Business API to manage locations under, we suggest you add yourself as the listing manager and transfer ownership of these verified listings in a different Google Account. Learn more

 

We also recommend using business accounts to share access to a large set of locations with a group of people within a Google Account. Please check out the best practices for using Business Accounts with Google My Business locations in the FAQ. You can add yourself as the business account manager and transfer ownership of a business account in a different Google Account. Learn more

 

However, please note the 100-page limit per Google Account when using business accounts. If you manage ten or more locations of the same chain, you may request bulk verification, which will remove the 100-page limit for that account. Please note that you should create a separate Google Account for each chain business you manage in order to be eligible for bulk verification.

 

Please note that you can’t access a particular location that you don’t manage as an owner or manager, or didn’t request and obtain user consent for the Google Account that the particular location is under, even if you have their locationId. Once you have access to all these verified business locations in the Google Account that you are accessing the API to manage locations under, you can send a GET request to list all locations under the specified account for their locationIds.

 

Thanks,

Terry

View solution in original post

Marked as Best Answer.
Solution
Accepted by topic author anumula b
August 2016

Re: how to get Location ID for the locations created from GMB UI

Google Employee
# 2
Google Employee

Hi @anumula b,

 

Deleting your existing, verified business locations and creating them as new locations would require you to verify these locations all over again.

 

If your existing, verified business locations created via the UI are in a different Google Account from the one you are accessing the Google My Business API to manage locations under, we suggest you add yourself as the listing manager and transfer ownership of these verified listings in a different Google Account. Learn more

 

We also recommend using business accounts to share access to a large set of locations with a group of people within a Google Account. Please check out the best practices for using Business Accounts with Google My Business locations in the FAQ. You can add yourself as the business account manager and transfer ownership of a business account in a different Google Account. Learn more

 

However, please note the 100-page limit per Google Account when using business accounts. If you manage ten or more locations of the same chain, you may request bulk verification, which will remove the 100-page limit for that account. Please note that you should create a separate Google Account for each chain business you manage in order to be eligible for bulk verification.

 

Please note that you can’t access a particular location that you don’t manage as an owner or manager, or didn’t request and obtain user consent for the Google Account that the particular location is under, even if you have their locationId. Once you have access to all these verified business locations in the Google Account that you are accessing the API to manage locations under, you can send a GET request to list all locations under the specified account for their locationIds.

 

Thanks,

Terry

how to get Location ID for the locations created from GMB UI

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Hi Terry, 

 

I was also wondering if there is a way to get the location id (accounts/{account_id}/locations/{location_id}) for locations within the Google My Business User Interface.  I understand that we can retrieve the list of these locations including the location id using the accounts.locations.list method, but we will have some locations that are still created using the UI and it would be nice to have the location id available in the UI so that we can use this as a unique identifier to link the data to a client in our internal database.  Can you advise if there is a way to retrieve the location id from within the UI?  If not, is there a best practice to a field we should use to link data from a GMB location to an external system such as using the storeCode field?

 

Thank you,

Addams

Re: how to get Location ID for the locations created from GMB UI

Google Employee
# 4
Google Employee

Hi @Viz D,

 

No, currently there is no way to get the location id for locations within the Google My Business User Interface. We suggest you checkout this response on how to get the location id via OAuth 2.0 Playground in Google My Business API.

 

Thanks,

The Google My Business API team

how to get Location ID for the locations created from GMB UI

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭

Hi,

I am trying to run https://mybusiness.googleapis.com/v4/accounts from my OAuth 2.0 playground and getting this error

GET /v4/accounts HTTP/1.1
Host: mybusiness.googleapis.com
Content-length: 0
Authorization: Bearer ya29.GlvXBRU0LNqEc4LgH2UCJNvpRnMTQ-1bWQcVS5c0ib-WuJ7rzeGkO0G2Rmz71V7h3326hucxy2yM34IpeMxl1s8IQdDWBxlaWDDpU9Dw7sKSKH8oNQVA83Xw50Cu
 
HTTP/1.1 403 Forbidden
Content-length: 766
X-xss-protection: 1; mode=block
X-content-type-options: nosniff
Transfer-encoding: chunked
Vary: Origin, X-Origin, Referer
Server: ESF
-content-encoding: gzip
Cache-control: private
Date: Mon, 11 Jun 2018 13:59:48 GMT
X-frame-options: SAMEORIGIN
Alt-svc: quic=":443"; ma=2592000; v="43,42,41,39,35"
Content-type: application/json; charset=UTF-8
{
 
"error": {
   
"status": "PERMISSION_DENIED",
   
"message": "Google My Business API has not been used in project 31564334237 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/mybusiness.googleapis.com/overview?project=3156433423... then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",
   
"code": 403,
   
"details": [
     
{
       
"@type": "type.googleapis.com/google.rpc.Help",
       
"links": [
         
{
           
"url": "https://console.developers.google.com/apis/api/mybusiness.googleapis.com/overview?project=3156433423...",
           
"description": "Google developers console API activation"
         
}
       
]
     
}
   
]
 
}
}

Please help

Re: how to get Location ID for the locations created from GMB UI

Google Employee
# 6
Google Employee

Hi @Bijesh M,

 

Judging from your email address on this board, your company may not have a whitelisted project to access the Google My Business API. So before you use any Google My Business API, you need to have a whitelisted project to access them. I suggest you please check out the Prerequisites page of our documentation website to learn more about requesting access to the Google My Business API.

 

Thanks,

Shalini

The Google My Business API team

how to get Location ID for the locations created from GMB UI

Visitor ✭ ✭ ✭
# 7
Visitor ✭ ✭ ✭

Hi Shalini,

 

I have submitted the access request form yesterday. I didn't get any confirmation email so far. How much time will it take to validate the account?

Thanks,

Bijesh.

Re: how to get Location ID for the locations created from GMB UI

Google Employee
# 8
Google Employee

Hi @Bijesh M,

 

It can take up to 2 weeks to process your request. We are reviewing your company’s application for Google My Business API access and will follow up with you after we’ve completed our review.

 

Thank you for your inquiry and patience!

 

Thanks,

Shalini

The Google My Business API team

how to get Location ID for the locations created from GMB UI

Visitor ✭ ✭ ✭
# 9
Visitor ✭ ✭ ✭

Hi Shalini,

 

Do you have any update on my application for Google My Business API access?

 

Thanks,

Bijesh.

Re: how to get Location ID for the locations created from GMB UI

Google Employee
# 10
Google Employee

Hi @Bijesh M,

 

Your project has been approved to use the Google My Business API! To find and enable the API, log into Developers Console and in the search box enter Google My Business API.

 

If you have any questions, please feel free to let me know and I would be happy to further assist!

 

Thanks,

Shalini

The Google My Business API team