简体   繁体   English

Google 我的商家 API 返回 200 状态但为空 JSON 响应

[英]Google My Business API Returns 200 Status But Empty JSON Response

I'm using the Google My Business API in my project to fetch insights using the reportInsights method.我在我的项目中使用 Google 我的商家 API 来使用reportInsights方法获取见解。 The Python script iterates over the list of locations and fetches insights for each location. Python 脚本遍历位置列表并获取每个位置的见解。 I know the code works because the majority of the locations return insights perfectly.我知道代码有效,因为大多数位置都能完美地返回见解。

However, for some locations the API returns a 200 status code but an empty JSON response body.但是,对于某些位置,API 返回 200 状态代码,但返回空的 JSON 响应主体。 No error message of any kind is provided.不提供任何类型的错误消息。

Things I've already checked:我已经检查过的事情:

  • The oAuth tokens are valid and not expired oAuth 令牌有效且未过期
  • The locations show up as verified in the Business Profile dashboard.这些位置在业务资料仪表板中显示为verified
  • The locations do have insights data for the selected timeframe in the Business Profile dashboard.这些地点确实在业务概况仪表板中包含选定时间范围内的洞察数据。
  • The account itself is most likely not the problem.帐户本身很可能不是问题。 Every account I tested had at least one location that successfully returns data.我测试的每个帐户都至少有一个位置可以成功返回数据。

I'd appreciate any advice or insight into the issue.我将不胜感激任何建议或对该问题的见解。

same issue also face to me.我也面临同样的问题。 api status code 200 but body data blank. api 状态代码 200 但正文数据为空。 any idea how it's wrong for that.知道这是怎么回事。

Method: GET
URL : https://mybusiness.googleapis.com/v4/accounts/accountId/locations/locationId/reviews?access_token=token

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM