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

List Accounts not giving all the accounts

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

Hello Team,

 

I am checking the api response for accounts and I am only getting the response for my account and the other accounts where i am the owner I am not getting the details by the account listing call,

 

Any one has idea how I need to proceed.

 

Thanks,

 

1 Expert replyverified_user

Re: List Accounts not giving all the accounts

Google Employee
# 2
Google Employee

Hi @Orphan D,

 

You should use your whitelisted project with a single set of OAuth 2.0 credentials to access your Google My Business data in different Google Accounts. For this all you need to do is to generate and store a separate OAuth 2.0 access token for each Google Account that you use for managing locations in Google My Business.

 

For generating separate OAuth 2.0 access tokens for each Google Account, when you use your whitelisted project’s credentials to obtain an OAuth 2.0 access token for authentication via the Google My Business API, you should be logging in with your specific Google Account. When this token is provided and you are making API calls, you will be able to view and manage all the existing locations within that specific account. You should repeat this process with a single set of OAuth 2.0 credentials for your separate Google Accounts to obtain a token for each Google Account.

 

When using the OAuth 2.0 client ID for authorization, you should store the refresh token for future use and use the access token to access the API. Once the access token expires, the application should use the refresh token to obtain a new one. This way, your application will always be able to request a new access token when necessary. This process requires a user to manually authorize the application only once.

 

In addition, Business accounts are recommended when you need to share access to a large set of locations with a group of people in a single Google Account, all of whom need access to that entire set of locations. Please check out the best practices for using Business Accounts with Google My Business locations.

 

Thanks,

Shalini