Проверьте подключение вашей учетной записи к Merchant API.
Если у вас есть существующая учетная запись продавца, вы можете использовать API Explorer в справочной документации , чтобы убедиться, что ваша учетная запись готова к использованию с 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 к вашей собственной учетной записи .
Если не указано иное, контент на этой странице предоставляется по лицензии Creative Commons "С указанием авторства 4.0", а примеры кода – по лицензии Apache 2.0. Подробнее об этом написано в правилах сайта. Java – это зарегистрированный товарный знак корпорации Oracle и ее аффилированных лиц.
Последнее обновление: 2024-11-11 UTC.
[null,null,["Последнее обновление: 2024-11-11 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"]]