我的商家串接-Google Business Profile API  - Mr. 蔡大痣數位轉型顧問 - WordPress 及 SEO 專家

我的商家串接-Google Business Profile API 

0 瀏覽

因為客戶的需求要開發一個比較大的我的商家評論同步的外掛,主要採主從式分離,由server端管控client(符合客戶驗證才可以存取評論資料),記錄一下串接遇到的心得。

串接異常處理 429

你的 Google Cloud 專案<申請時需要輸入專案ID> 的 My Business Account Management API 配額是 0 次/分鐘,代表這個 API 根本沒有被核准使用,不是呼叫太頻繁。

專案 ID:專案的全域專屬 ID。
專案 ID 是專屬字串,用於區分 Google Cloud中的專案。輸入專案名稱後,Google Cloud 主控台會產生專屬專案 ID,其中可包含字母、數字和連字號。建議您使用系統產生的專案 ID,但您可以在建立專案時編輯該 ID。專案建立後,專案 ID 就會永久存在。

解決步驟:

  1. 前往 Google Cloud Console – APIs
  2. 搜尋 My Business Account Management API,確認已啟用
  3. 如果已啟用但配額仍為 0,前往 配額頁面,確認 DefaultRequestsPerMinutePerProject 的值
  4. 若配額為 0,需要點擊「Request a higher quota limit」申請配額提升

注意:Google Business Profile API 屬於受限 API,需要申請存取權限。你可能需要:

 {
  "error": {
    "code": 429,
    "message": "Quota exceeded for quota metric 'Requests' and limit 'Requests per minute' of service 'mybusinessaccountmanagement.googleapis.com' for consumer 'project_number:884712124207'.",
    "status": "RESOURCE_EXHAUSTED",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.ErrorInfo",
        "reason": "RATE_LIMIT_EXCEEDED",
        "domain": "googleapis.com",
        "metadata": {
          "service": "mybusinessaccountmanagement.googleapis.com",
          "quota_unit": "1/min/{project}",
          "quota_limit": "DefaultRequestsPerMinutePerProject",
          "quota_location": "global",
          "quota_metric": "mybusinessaccountmanagement.googleapis.com/default_requests",
          "quota_limit_value": "0",
          "consumer": "projects/884712124207"
        }
      },
      {
        "@type": "type.googleapis.com/google.rpc.Help",
        "links": [
          {
            "description": "Request a higher quota limit.",
            "url": "https://cloud.google.com/docs/quotas/help/request_increase"
          }
        ]
      }
    ]
  }
}

▧ 文章分類

▧ 熱門文章

▧ 最新文章

✦ 虎鯨 OrcaBiz SEO 優化專業團隊 ✦

專業 SEO 公司幫助你將流量累積成看得見的業績,成為長期有效的最強業務!

[orca_infinite_scroll]