是帐户所需的OAuth 2.0。

发布于 2025-02-07 19:38:30 字数 468 浏览 2 评论 0原文

我有一个React应用程序,该应用程序将利用Google我的业务API获取企业的审核数据。

我期望通过REST方法使用API​​-KEY,但是授权范围提到使用此API需要OAuth 2.0。

在我阅读了有关Oauth的目的的更多信息之后,似乎更多的是应用程序需要访问用户数据,因此需要由Google验证的同意屏幕。

但是,对于我的用例,我所需要的只是访问所有Google评论的企业评论,而与访问用户无关。

有人可以推荐一种方法吗? (当用户访问我不需要用户数据时,我不希望弹出/同意请求。)

I have a React Application which is going to leverage Google My Business API to get review data of a business.

I was expecting to use the API-KEY via REST approach however Authorization Scope mentions that OAuth 2.0 is required to use this API.

After I read more about OAuth's purpose, it seemed like it is more for application's which require access to a user's data and therefore would required a consent screen verified by google.

For my use-case however, all I need is access to all google reviews for a business and nothing related to the visiting users.

Can someone recommend an approach for this? (I don't want a pop-up/consent request when a user visits as I don't need user data.)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

滥情稳全场 2025-02-14 19:38:30

经过大量研究,似乎您想检索您的业务所有评论,您将必须使用Google的我的业务API。此API 要求您使用OAuth2进行身份验证,这意味着(尽管您不会查询访问用户的数据)将需要访问用户才能提供同意的弹出屏幕。

这使您将API作为下一个最佳选择:

休息get endpoint maps.googleapis.com/maps/api/place/place/details/json?placeId= {您的位置ID} {您的API键}

尽管这仅返回Google的前5名“最有用的”评论,但它几乎是在未经同意屏幕的情况下获取评论的唯一方法除非您想刮擦数据,否则由于多种原因不是理想的...

After much research, it seems that if you want to retrieve ALL REVIEWS for your business you will have to use Google's My Business API. This API requires you to use OAUTH2 for authentication which means (although you will not be querying a visiting user's data) visiting users will be required to provide consent pop up screen.

This leaves you with the places API as the next best option:

REST GET endpoint maps.googleapis.com/maps/api/place/details/json?placeid={your place ID}&fields=review&key={YOUR API KEY}

Although this only returns google's top 5 "most helpful" reviews, its pretty much the only way to get reviews without a consent screen unless you want to scrape data which is not ideal for many reasons...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文