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

Display reviews on website

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

I would like to be able to display my reviews without needing to authenticate.  Is this possible?  The reviews are public so I'm not sure why they would need to authenticate to simple list all reviews.

1 Expert replyverified_user

Re: Display reviews on website

Google Employee
# 2
Google Employee

Hi @Jeremy L,

 

No, you need to use OAuth 2.0 because your app will access protected (non-public) data and for that you will need an OAuth 2.0 client ID. The OAuth 2.0 client ID lets your app request authorization to access your organization's location data on behalf of your app's users.

 

Thanks,

The Google My Business API team

Display reviews on website

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

I've played with the playground and it seems like the user would have to authenticate by signing in in order to retrieve the token and then needs to be redirected.  Is there any way to make the request with only environment variables in order to make a successful request, rather than this token that expires relatively quickly?

Re: Display reviews on website

Google Employee
# 4
Google Employee

Hi @Jeremy L,

 

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.

 

Thanks,

The Google My Business API team

Display reviews on website

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭

I guess the piece I am not following is why the user needs to authorize anything when in reality all I want to do is display my reviews.  This should have nothing to do with them.  Guess I'll have to hard code them.