ยืนยันการเชื่อมต่อบัญชีกับ Merchant API
หากมีบัญชีผู้ขายอยู่แล้ว คุณสามารถใช้เครื่องมือสำรวจ API ในเอกสารอ้างอิงเพื่อยืนยันว่าบัญชีพร้อมใช้งานกับ Merchant API แล้ว
- ค้นหาชื่อทรัพยากรของบัญชีโดยการเชื่อมโยง
accounts/
และ
merchantId
คุณจะเห็น merchantId
ที่ด้านบนของ Google Merchant Center
- ใน API Explorer สำหรับ
accounts.products.list
ให้ทำดังนี้
- ป้อนชื่อทรัพยากรของบัญชีในช่อง
parent
- ในส่วนข้อมูลเข้าสู่ระบบ ให้เลือก Google OAuth 2.0 และคีย์ API
- คลิกดำเนินการ
- หากได้รับข้อความแจ้ง ให้ลงชื่อเข้าใช้ด้วยบัญชี Google ที่เชื่อมโยงกับบัญชี Google Merchant Center
หากตั้งค่าบัญชีผู้ขายอย่างถูกต้องแล้ว คำขอจะสำเร็จและส่งคืนได้
รหัสตอบกลับ HTTP 200
หากคุณเพิ่งสร้างบัญชีใหม่
เมธอด accounts.products.list
ไม่แสดงผลิตภัณฑ์ใดๆ
ถัดไป
ใช้ไลบรารีไคลเอ็นต์เพื่อขอสิทธิ์เข้าถึงบัญชีผู้ขายอื่นๆ
หรือ
ใช้บัญชีบริการเพื่อให้สิทธิ์เข้าถึง API แก่บัญชีของคุณเอง
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2024-10-23 UTC
[null,null,["อัปเดตล่าสุด 2024-10-23 UTC"],[[["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"]]