GMB接口域名变更后,如何获取各地点媒体资源?
获取Google Business Profile地点媒体资源的正确方式
- 原有的
mybusiness.googleapis.com/v4/accounts/locations/<location_number>/media和新域名mybusinessaccountmanagement.googleapis.com/v1下的对应接口已被废弃,当前需使用Business Profile API的专用媒体接口:- 接口地址:
https://mybusinessbusinessinformation.googleapis.com/v1/accounts/{accountId}/locations/{locationId}/media - 请求方式:
GET
- 接口地址:
- 调用前提:
- 在Google Cloud控制台中启用Business Profile API
- 使用具备
https://www.googleapis.com/auth/business.manage权限的OAuth 2.0有效凭据
- 示例请求格式:
GET https://mybusinessbusinessinformation.googleapis.com/v1/accounts/12345/locations/67890/media?pageSize=10 - 返回结果包含媒体资源的元数据(URL、类型、创建时间等),可通过
mediaUrl字段直接访问对应资源。
内容的提问来源于stack exchange,提问作者Mehmet Ali Kuş
相关产品推荐
相关产品推荐

