首页 文章

如何使用商业API获取所有谷歌评论

提问于
浏览
4

我需要针对特定位置的所有谷歌评论,但我无法使用谷歌的业务API . 这是获取请求的URL

https://mybusiness.googleapis.com/v3/accounts/account_name/locations/location_name/reviews

现在我的问题是param account_name和location_name的值是什么我怎么能得到它 .

请回答示例位置示例

2 回答

  • 6

    我认为首先你需要将你的google my business api白名单列入你的项目作为私人api的任何项目 . Google我的商家api将处理与您的帐户相关联的位置,因此请务必从您知道的任何帐户验证LOCATIONS . 然后,您可以尝试在OAuthplayground中提到的api调用 .

    设置等后,您将自动了解帐户ID和位置ID .

    还有更多的网址,你可以更好地了解它 .

  • 3

    当您向 https://mybusiness.googleapis.com/v3/accounts 发出请求时,它会为您提供一个帐户列表 . 在这些帐户上,他们有一个名为name的字段 . 该字段是accounts / account_name .

    {
      "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 .

    {
      "locations": [
        {
          "languageCode": "en", 
          "openInfo": {
            "status": "OPEN", 
            "canReopen": true
          }, 
          "name": "accounts/1337/locations/13161337", 
          ...
    }
    

相关问题