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

How to generate refresh token with an organizational account for accessing GMB API

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

Hi,

 

Previously, I used to successfully create refresh token using C# library as shown below:

 

OAUth2Credential = GoogleWebAuthorizationBroker.AuthorizeAsync(
new ClientSecrets
{
ClientId = "<<My_Client_ID>>",
ClientSecret = "<<My_Client_Secret>>"
},
new[] { "https://www.googleapis.com/auth/plus.business.manage"}, "< Text has been removed to protect private information >", CancellationToken.None).Result;

 

Here :"< Text has been removed to protect private information >" is my username for my gmail ID - < Text has been removed to protect private information >

 

Now, I would like to replace the above code with my organizational account say 'abc_xyz@organizationaldomain.com' . This organaztional account has a project created in google developer's console and the same project is whitelisted for GMB API access.

 

Can I directly replace "< Text has been removed to protect private information >" with "abc_xyz"? Is there any other process in replacing it.

 

Thanks and Regards,

Bharath

2 Expert replyverified_user

Re: How to generate refresh token with an organizational account for accessing GMB API

Google Employee
# 2
Google Employee

Hi @anumula b,

 

To successfully create a refresh token using C# library, if your organizational account has ‘Owner’ role, then you can replace your username with ‘abc_xyz@organizationaldomain.com’  (because 'abc_xyz@organizationaldomain.com' is a google account) in the code.

 

Thanks,

The Google My Business API team

How to generate refresh token with an organizational account for accessing GMB API

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

same problem with javascript and  nodejs.

 

Re: How to generate refresh token with an organizational account for accessing GMB API

Google Employee
# 4
Google Employee

Hi @Jesse A,

 

I’ve provided a solution for your problem in this thread.

 

Thanks,

Terry