If you have an existing Merchant Center account, you can use Google APIs Explorer in the reference documentation to verify that your account is ready to use with the Merchant API.
- Find the resource name of your account by concatenating
accounts/
and yourmerchantId
. You can find yourmerchantId
in the top of Google Merchant Center. - In the API Explorer for the
accounts.products.list
method, do the following:- Enter the resource name of your account in the
parent
field. - In the Credentials section, select Google OAuth 2.0 and API key.
- Click Execute.
- If prompted, sign in with the Google Account associated with your Google Merchant Center account.
- Enter the resource name of your account in the
If your Merchant Center account is set up correctly, the request succeeds and
returns an HTTP response code 200
. If you just created a new account, the
accounts.products.list
method doesn't return any products.
Next, try using a client library to request access to other Merchant Center accounts. Client libraries support user authorization, which grants an application permission to access and manage Merchant Center account data.
You can also use a service account to authorize API access to your own account. A service account is a special type of account that belongs to an application instead of an individual end user. For more information, see Service accounts overview.