我需要针对特定位置的所有谷歌评论,但我无法使用谷歌的业务API . 这是获取请求的URL
https://mybusiness.googleapis.com/v3/accounts/account_name/locations/location_name/reviews
现在我的问题是param account_name和location_name的值是什么我怎么能得到它 .
请回答示例位置示例
我认为首先你需要将你的google my business api白名单列入你的项目作为私人api的任何项目 . Google我的商家api将处理与您的帐户相关联的位置,因此请务必从您知道的任何帐户验证LOCATIONS . 然后,您可以尝试在OAuthplayground中提到的api调用 .
设置等后,您将自动了解帐户ID和位置ID .
还有更多的网址,你可以更好地了解它 .
https://console.developers.google.com(这里你将设置你的项目)
https://business.google.com/manage(在这里您将添加/可以查看您需要评论的位置)
https://developers.google.com/my-business/content/get-started(完成先决条件后的步骤)
https://developers.google.com/oauthplayground(您将在批准后在此处测试我的业务api)
当您向 https://mybusiness.googleapis.com/v3/accounts 发出请求时,它会为您提供一个帐户列表 . 在这些帐户上,他们有一个名为name的字段 . 该字段是accounts / account_name .
https://mybusiness.googleapis.com/v3/accounts
{ "state": { "status": "UNVERIFIED" }, "type": "PERSONAL", "name": "accounts/1337", "accountName": "example" }
当您向 https://mybusiness.googleapis.com/v3/accounts/account_name/locations 发出请求时,它会为您提供一个位置列表 . 在这些位置,他们有一个名为name的字段 . 该字段是accounts / account_name / locations / location_name .
https://mybusiness.googleapis.com/v3/accounts/account_name/locations
{ "locations": [ { "languageCode": "en", "openInfo": { "status": "OPEN", "canReopen": true }, "name": "accounts/1337/locations/13161337", ... }
2 回答
我认为首先你需要将你的google my business api白名单列入你的项目作为私人api的任何项目 . Google我的商家api将处理与您的帐户相关联的位置,因此请务必从您知道的任何帐户验证LOCATIONS . 然后,您可以尝试在OAuthplayground中提到的api调用 .
设置等后,您将自动了解帐户ID和位置ID .
还有更多的网址,你可以更好地了解它 .
https://console.developers.google.com(这里你将设置你的项目)
https://business.google.com/manage(在这里您将添加/可以查看您需要评论的位置)
https://developers.google.com/my-business/content/get-started(完成先决条件后的步骤)
https://developers.google.com/oauthplayground(您将在批准后在此处测试我的业务api)
当您向
https://mybusiness.googleapis.com/v3/accounts
发出请求时,它会为您提供一个帐户列表 . 在这些帐户上,他们有一个名为name的字段 . 该字段是accounts / account_name .当您向
https://mybusiness.googleapis.com/v3/accounts/account_name/locations
发出请求时,它会为您提供一个位置列表 . 在这些位置,他们有一个名为name的字段 . 该字段是accounts / account_name / locations / location_name .