验证您的帐号与 Merchant API 的关联
如果您已有商家账号,可以使用参考文档中的 API 浏览器验证您的账号是否已准备好与 Merchant API 搭配使用。
- 将
accounts/
和 merchantId
串联起来,即可找到您账号的资源名称。您可以在 Google Merchant Center 的顶部找到 merchantId
。
- 在 API Explorer 中
accounts.products.list
方法,请执行以下操作:
- 在
parent
字段中输入您账号的资源名称。
- 在凭据部分中,选择 Google OAuth 2.0 和 API 密钥。
- 点击执行。
- 如果系统提示,请使用与您的 Google Merchant Center 账号关联的 Google 账号登录。
如果您的商家账号设置正确,请求会成功并返回
HTTP 响应代码 200
。如果您刚刚创建一个新账号,
accounts.products.list
方法不会返回任何商品。
接下来
使用客户端库请求对其他商家账号的访问权限,
或
使用服务账号向您自己的账号授予 API 访问权限。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-10-23。
[null,null,["最后更新时间 (UTC):2024-10-23。"],[[["Existing merchant account holders can use the API explorer to verify their account's compatibility with the Merchant API."],["Account verification involves locating your `merchantId`, constructing the resource name, and executing the `accounts.products.list` method within the API Explorer using your credentials."],["Successful verification is indicated by an HTTP response code `200`, although new accounts may not return any product data."],["After verification, users can proceed to utilize client libraries for accessing other merchant accounts or employ service accounts for authorizing API access to their own account."]]],["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"]]