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

Account not listed when calling from a service account

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

I am struggling to get a request to work using the service account - when listing available accounts only a single personal account is returned. Have tried to create the service account under both the original owner as well as the email address specified during the api application process - this has not made a difference. 

1 Expert replyverified_user

Re: Account not listed when calling from a service account

Google Employee
# 2
Google Employee

Hi @Richard M,


Since you are building a service account application, please make sure you are requesting user consent involving human interaction for each Google Account that you need to access the Google My Business data from and manually authorize your app during OAuth 2.0 flow at least once prior to authenticating with the public/private key pair. You can request user consent using OAuth 2.0 installed applications flow, OAuth 2.0 web server applications flow or via OAuth 2.0 Playground. However, you don’t have to save your retrieved refresh tokens for a service account application. Instead, you specify the user to impersonate by specifying the email address of the user account for access to their Google My Business data when you prepare to make authorized API calls. This is because a service account is an account that belongs to your application instead of an individual end user with a Google Account.


Please check out this Accepted Solution for requesting user consent for a service account application.