Account not listed when calling from a service account[ Edited ]
February 2017 - last edited February 2017 by Shalini S
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.
Re: Account not listed when calling from a service account
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.