验证您的帐号与 Merchant API 的关联
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
如果您已有 Merchant Center 账号,可以使用参考文档中的 Google API Explorer 验证您的账号是否已准备好与 Merchant API 搭配使用。
- 将
accounts/
和 merchantId
串联起来,即可找到您账号的资源名称。您可以在 Google Merchant Center 的顶部找到 merchantId
。
- 在
accounts.products.list
方法的 API Explorer 中,执行以下操作:
- 在
parent
字段中输入您账号的资源名称。
- 在凭据部分中,选择 Google OAuth 2.0 和 API 密钥。
- 点击执行。
- 如果系统提示,请使用与您的 Google Merchant Center 账号关联的 Google 账号登录。
如果您的 Merchant Center 账号设置正确,请求会成功并返回 HTTP 响应代码 200
。如果您刚刚创建了新账号,accounts.products.list
方法将不会返回任何商品。
接下来,尝试使用客户端库请求访问其他 Merchant Center 账号。客户端库支持用户授权,可向应用授予访问和管理 Merchant Center 账号数据的权限。
您还可以使用服务账号向 API 授予对您自己账号的访问权限。服务账号是一种特殊类型的账号,属于应用(而不是某个最终用户)。如需了解详情,请参阅服务账号概览。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-08。
[null,null,["最后更新时间 (UTC):2025-08-08。"],[],["To verify a merchant account for API use, locate your `merchantId` in Google Merchant Center and construct the account's resource name. In the API Explorer, use the `accounts.products.list` method, input the resource name in the `parent` field, and select Google OAuth 2.0 and API key credentials. Executing the request should return an HTTP 200 code, confirming successful setup. For new accounts, the product list will be empty. Further access can be configured via client libraries or service accounts.\n"],null,[]]