驗證帳戶和 Merchant API 的連線
如果您已有商家帳戶,可以使用參考文件中的 API Explorer,確認帳戶已準備好使用 Merchant API。
- 將
accounts/
和您的
merchantId
。你可以在 Google Merchant Center 的頂端找到 merchantId
。
- 在 API Explorer 中
accounts.products.list
方法後,請執行下列步驟:
- 在
parent
欄位中輸入帳戶的資源名稱。
- 在「憑證」部分中,選取「Google OAuth 2.0」和「API 金鑰」。
- 按一下 [Execute] (執行)。
- 如果系統顯示提示,請使用與 Google 帳戶相關聯的 Google 帳戶登入
Merchant Center 帳戶:
如果商家帳戶設定正確,要求就會成功並傳回
HTTP 回應代碼 200
。如果您剛建立新帳戶,accounts.products.list
方法不會傳回任何產品。
接著,使用用戶端程式庫要求存取其他商家帳戶,或使用服務帳戶授權 API 存取您自己的帳戶。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-10-23 (世界標準時間)。
[null,null,["上次更新時間: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"]]