Merchant API v1beta was discontinued and shut down on February 28, 2026. For steps to transition to the latest stable version, seeMigrate from v1beta to v1.
Control access to your accountStay organized with collectionsSave and categorize content based on your preferences.
Page Summary
The Merchant Accounts API allows you to manage user access and permissions for your merchant account.
You can view, add, and remove users, as well as control their access levels (super admin, admin, standard) using the API.
Super admin users, managed through Business Manager, cannot be removed via the Merchant Accounts API.
Certain API methods require specific access levels, which are detailed in the reference documentation.
The Merchant API lets you programmatically manage who can access your
Merchant Center account, and their access rights. This is essential for
maintaining security and verifying that individuals have appropriate access to
perform their roles, whether it's managing products, viewing reports, or
administering the account. You can add users, update their access rights, view
current users, and remove users who no longer need access.
When managing user access, it is important to adhere to the principle of least
privilege, verifying that users are granted only the minimum necessary access
rights required to perform their specific roles, and no more.
When you add a user, they receive an invitation and, upon acceptance, can access
your Merchant Center account with the access rights you've granted. You can
find more information about managing people and their access rights atI need help with people and access levels.
Supported features
Create
Delete
Get
List
Update
List users associated with your Merchant Center account
You can retrieve a list of all users who have access to your Merchant Center
account. This is useful for auditing access and understanding current user
access rights. The response will include each user's email and their assigned
access rights.
fromexamples.authenticationimportconfigurationfromexamples.authenticationimportgenerate_user_credentialsfromgoogle.shopping.merchant_accounts_v1importListUsersRequestfromgoogle.shopping.merchant_accounts_v1importUserServiceClient_ACCOUNT=configuration.Configuration().read_merchant_info()defget_parent(account_id):returnf"accounts/{account_id}"deflist_users():"""Lists all the users for a given Merchant Center account."""# Get OAuth credentialscredentials=generate_user_credentials.main()# Create a UserServiceClientclient=UserServiceClient(credentials=credentials)# Create parent stringparent=get_parent(_ACCOUNT)# Create the requestrequest=ListUsersRequest(parent=parent)try:print("Sending list users request:")response=client.list_users(request=request)count=0forelementinresponse:print(element)count+=1print("The following count of elements were returned: ")print(count)exceptRuntimeErrorase:print(e)if__name__=="__main__":list_users()
curl -L -X GET \'https://merchantapi.googleapis.com/accounts/v1/accounts/{ACCOUNT_ID}/users' \-H 'Authorization: Bearer{API_TOKEN}'
Get details for a specific user
To fetch detailed information about a specific user associated with your
Merchant Center account, including their current access rights and status
(for example,VERIFIEDorPENDING), you can use their Google email address.
fromexamples.authenticationimportconfigurationfromexamples.authenticationimportgenerate_user_credentialsfromgoogle.shopping.merchant_accounts_v1importGetUserRequestfromgoogle.shopping.merchant_accounts_v1importUserServiceClient_ACCOUNT=configuration.Configuration().read_merchant_info()defget_user(user_email):"""Gets a single user for a given Merchant Center account."""# Get OAuth credentialscredentials=generate_user_credentials.main()# Create a UserServiceClientclient=UserServiceClient(credentials=credentials)# Create user name stringname="accounts/"+_ACCOUNT+"/users/"+user_email# Create the requestrequest=GetUserRequest(name=name)try:print("Sending Get user request:")response=client.get_user(request=request)print("Retrieved User below")print(response)exceptRuntimeErrorase:print(e)if__name__=="__main__":# Modify this email to get the user detailsemail="USER_MAIL_ACCOUNT"get_user(email)
curl -L -X GET \'https://merchantapi.googleapis.com/accounts/v1/accounts/{ACCOUNT_ID}/users/{EMAIL_ID}' \-H 'Authorization: Bearer{API_TOKEN}'
Add a user to your Merchant Center account
You can grant a user access to your Merchant Center account by providing
their Google email address and specifying their intended access rights. This
action sends an invitation to the user. After they accept, they are able to
access the account with the permissions you've defined.
{ACCOUNT_ID}: The unique identifier of your
Merchant Center account.
{EMAIL_ID}: The email address of the user you
want to add.
A successful request returns a 200 OK HTTP status code and a response body with
the newly createdUserresource, typically in aPENDINGstate until the user
accepts the invitation.
fromexamples.authenticationimportconfigurationfromexamples.authenticationimportgenerate_user_credentialsfromgoogle.shopping.merchant_accounts_v1importAccessRightfromgoogle.shopping.merchant_accounts_v1importCreateUserRequestfromgoogle.shopping.merchant_accounts_v1importUserfromgoogle.shopping.merchant_accounts_v1importUserServiceClient_ACCOUNT=configuration.Configuration().read_merchant_info()defget_parent(account_id):returnf"accounts/{account_id}"defcreate_user(user_email):"""Creates a user for a Merchant Center account."""# Get OAuth credentialscredentials=generate_user_credentials.main()# Create a UserServiceClientclient=UserServiceClient(credentials=credentials)# Create parent stringparent=get_parent(_ACCOUNT)# Create the requestrequest=CreateUserRequest(parent=parent,user_id=user_email,user=User(access_rights=[AccessRight.ADMIN,AccessRight.PERFORMANCE_REPORTING]),)try:print("Sending Create User request")response=client.create_user(request=request)print("Inserted User Name below")print(response.name)exceptRuntimeErrorase:print(e)if__name__=="__main__":# Modify this email to create a new useremail="USER_MAIL_ACCOUNT"create_user(email)
You can modify the access level of an existing user in your Merchant Center
account. For example, you can elevate a user fromSTANDARDtoADMINaccess,
or addPERFORMANCE_REPORTINGrights. The changes take effect immediately for
verified users.
This corresponds to theusers.patchmethod. You need to specify theupdateMaskquery parameter to indicate which
fields are being updated, in this case,accessRights.
fromexamples.authenticationimportconfigurationfromexamples.authenticationimportgenerate_user_credentialsfromgoogle.protobufimportfield_mask_pb2fromgoogle.shopping.merchant_accounts_v1importAccessRightfromgoogle.shopping.merchant_accounts_v1importUpdateUserRequestfromgoogle.shopping.merchant_accounts_v1importUserfromgoogle.shopping.merchant_accounts_v1importUserServiceClientFieldMask=field_mask_pb2.FieldMask_ACCOUNT=configuration.Configuration().read_merchant_info()defupdate_user(user_email,user_access_right):"""Updates a user to make it an admin of the MC account."""credentials=generate_user_credentials.main()client=UserServiceClient(credentials=credentials)# Create user name stringname="accounts/"+_ACCOUNT+"/users/"+user_emailuser=User(name=name,access_rights=[user_access_right])field_mask=FieldMask(paths=["access_rights"])try:request=UpdateUserRequest(user=user,update_mask=field_mask)print("Sending Update User request")response=client.update_user(request=request)print("Updated User Name below")print(response.name)exceptRuntimeErrorase:print(e)if__name__=="__main__":# Modify this email to update the right useremail="USER_MAIL_ACCOUNT"access_right=AccessRight.ADMINupdate_user(email,access_right)
You can revoke a user's access to your Merchant Center account. This action
permanently removes their ability to sign in and perform any actions associated
with your account.
fromexamples.authenticationimportconfigurationfromexamples.authenticationimportgenerate_user_credentialsfromgoogle.shopping.merchant_accounts_v1importDeleteUserRequestfromgoogle.shopping.merchant_accounts_v1importUserServiceClient_ACCOUNT=configuration.Configuration().read_merchant_info()defdelete_user(user_email):"""Deletes a user for a given Merchant Center account."""# Get OAuth credentialscredentials=generate_user_credentials.main()# Create a UserServiceClientclient=UserServiceClient(credentials=credentials)# Create user name stringname="accounts/"+_ACCOUNT+"/users/"+user_email# Create the requestrequest=DeleteUserRequest(name=name)try:print("Sending Delete User request")client.delete_user(request=request)print("Delete successful.")exceptRuntimeErrorase:print(e)if__name__=="__main__":# Modify this email to delete the right useremail="USER_MAIL_ACCOUNT"delete_user(email)
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-06-09 UTC."],[],["The Merchant Accounts API manages user access to merchant accounts. Key actions include: adding users via the `accounts.users.create` method, specifying access levels like `STANDARD` or `PERFORMANCE_REPORTING`; viewing all users with `accounts.users.list`; retrieving a specific user with `GetUserRequest`; removing users using `accounts.users.delete`; and changing access levels with `accounts.users.patch`. Java code samples demonstrate these actions, utilizing `UserServiceClient` methods like `createUser`, `listUsers`, `getUser`, `deleteUser` and `updateUser` to interact with the API.\n"]]