管理账号和营业地点的管理员
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
在 My Business Account Management API 中,负责管理商家账号和营业地点的用户称为“管理员”。如要详细了解管理员如何管理账号和营业地点,请参阅商家资料账号和营业地点组以及管理商家信息详情。
账号和营业地点的管理员由以下集合表示:
管理员的资源路径如下所示:
accounts/{accountId}/admins/{adminId}
locations/{locationId}/admins/{adminId}
您可以执行以下操作:
列出某个账号或营业地点的管理员
列出指定账号或营业地点的管理员。
列出某个账号的管理员
GET
https://mybusiness.googleapis.com/v1/accounts/{accountId}/admins
列出某个营业地点的管理员
GET
https://mybusinessaccountmanagement.googleapis.com/v1/locations/{locationId}/admins
为某个账号或营业地点添加管理员
邀请他人担任某个账号或营业地点的管理员。您必须将邀请对象的电子邮件地址与 Google 账号相关联。邀请对象使用其 Google 账号登录商家资料时,系统会提示他们同意相应的条款及条件,同意后方能进行更改。
邀请用户担任账号管理员
POST
https://mybusinessaccountmanagement.googleapis.com/v1/accounts/{accountId}/admins
邀请用户担任营业地点管理员
POST
https://mybusinessaccountmanagement.googleapis.com/v1/locations/{locationId}/admins
{
"role": "MANAGER",
"adminName": "example@example.com"
}
邀请营业地点组担任营业地点管理员
POST
https://mybusinessaccountmanagement.googleapis.com/v1/locations/{locationId}/admins
{
"account": "LocationGroupID",
"role": "MANAGER"
}
移除某个账号或营业地点的管理员
移除指定账号或营业地点的管理员。
移除某个账号的管理员
DELETE
https://mybusinessaccountmanagement.googleapis.com/v1/accounts/{accountId}/admins/{adminId}
移除某个营业地点的管理员
DELETE
https://mybusinessaccountmanagement.googleapis.com/v1/accounts/locations/{locationId}/admins/{adminId}
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-29。
[null,null,["最后更新时间 (UTC):2025-08-29。"],[[["\u003cp\u003eThe My Business Account Management API uses the term "admins" to refer to managers of business accounts and locations, providing tools to manage accounts, locations, and listing details.\u003c/p\u003e\n"],["\u003cp\u003eAdmins can be managed through dedicated collections and resource paths, allowing for operations like listing, adding, and removing admins for specific accounts or locations.\u003c/p\u003e\n"],["\u003cp\u003eAPI endpoints facilitate listing existing admins, inviting new admins (users or LocationGroups) by associating their email with a Google Account, and removing admin access.\u003c/p\u003e\n"],["\u003cp\u003eAdmins can be assigned roles and permissions using the API, ensuring appropriate levels of access for managing business accounts and locations.\u003c/p\u003e\n"],["\u003cp\u003eAll admin management operations, including adding, listing, and removing, are performed using standard HTTP methods (GET, POST, DELETE) against specific API endpoints.\u003c/p\u003e\n"]]],[],null,["# Manage admins for accounts and locations\n\n\u003cbr /\u003e\n\nIn the My Business Account Management API, managers for business accounts and locations are\nreferred to as *admins* . To find out more about how admins can manage accounts\nand locations, see [Business Profile accounts and location groups](/my-business/content/accounts) and\n[Manage listing details](/my-business/content/manage-locations).\n\nAdmins for accounts and locations are represented by the following collections:\n\n- [accounts.admins](/my-business/reference/accountmanagement/rest/v1/accounts.admins)\n- [accounts.locations.admins](/my-business/reference/accountmanagement/rest/v1/locations.admins)\n\nThe resource paths for admins are as follows: \n\n```text\naccounts/{accountId}/admins/{adminId}\nlocations/{locationId}/admins/{adminId}\n```\nYou can perform the following operations:\n\n\u003cbr /\u003e\n\n- [List admins for an account or location](/my-business/reference/accountmanagement/rest/v1/accounts.admins/list)\n- [Add an admin to an account or location](/my-business/reference/accountmanagement/rest/v1/accounts.admins/create)\n- [Remove an admin from an account or location](/my-business/reference/accountmanagement/rest/v1/accounts.admins/delete)\n\nList admins for an account or location\n--------------------------------------\n\nLists the admins for the specified account or location.\nHTTP\n\nTo list the admins for an account \n\n```\nGET\nhttps://mybusiness.googleapis.com/v1/accounts/{accountId}/admins\n```\n\nTo list the admins for a location \n\n```\nGET\nhttps://mybusinessaccountmanagement.googleapis.com/v1/locations/{locationId}/admins\n```\n\nAdd an admin to an account or location\n--------------------------------------\n\nInvites someone to become an admin for an account or location. You must\nassociate the invitee's email address with a Google Account. When the\ninvitee signs in to Business Profile using their Google Account, they will\nbe prompted to agree to the terms and conditions before they can make changes.\nHTTP\n\nTo invite a user to be an admin for an account \n\n```\nPOST\nhttps://mybusinessaccountmanagement.googleapis.com/v1/accounts/{accountId}/admins\n```\n\nTo invite a user to be an admin for a location \n\n```\nPOST\nhttps://mybusinessaccountmanagement.googleapis.com/v1/locations/{locationId}/admins\n{\n \"role\": \"MANAGER\",\n \"adminName\": \"example@example.com\"\n}\n```\n\nTo invite a LocationGroup to be an admin for a location \n\n```\nPOST\nhttps://mybusinessaccountmanagement.googleapis.com/v1/locations/{locationId}/admins\n{\n \"account\": \"LocationGroupID\",\n \"role\": \"MANAGER\"\n}\n```\n\nRemove an admin from an account or location\n-------------------------------------------\n\nRemoves an admin from the specified account or location.\nHTTP\n\nTo remove an admin from an account \n\n```\nDELETE\nhttps://mybusinessaccountmanagement.googleapis.com/v1/accounts/{accountId}/admins/{adminId}\n```\n\nTo remove an admin from a location \n\n```\nDELETE\nhttps://mybusinessaccountmanagement.googleapis.com/v1/accounts/locations/{locationId}/admins/{adminId}\n```"]]