Multiple API key's/ multiple accounts[ Edited ]
June 2016 - last edited June 2016 by Terry W
We're currently working with the GMB API, and it's been working fairly well (not perfect though, but it's an improvement).
Now we have a bit of an issue. We manage two seperate accounts (both with quite a few different business accounts under it and over 10000 locations within each).
We'd like to receive an extra API key, but apparently that's not possible.
So basically I'm here for the following: We've heard that it's possible to register these 2 seperate accounts under 1 API key, but we cannot find any documentation for this.
Has anyone done this or found documentation for it?
Any help would be greatly appreciated!
Re: Multiple API key's/ multiple accounts
Hi @Stefan K,
You can generate separate OAuth 2.0 access tokens for each Google Account you manage your business locations using. 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 do this with a single set of OAuth 2.0 credentials for your separate Google Accounts to obtain a token for each Google Account.
In addition, when using the OAuth 2.0 client ID for authorization, you should persist the refresh token so that 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.