Method: accounts.invitations.list
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
HTTP 请求
GET https://mybusiness.googleapis.com/v4/{parent=accounts/*}/invitations
网址采用 gRPC 转码语法。
路径参数
参数 |
parent |
string
从中检索邀请列表的账号的名称。
|
查询参数
参数 |
targetType |
enum (TargetType )
指定应在响应中显示的目标类型。
|
响应正文
如果成功,响应正文将包含结构如下的数据:
AccessControl.ListInvitations 的响应消息。
JSON 表示法 |
{
"invitations": [
{
object (Invitation )
}
]
} |
字段 |
invitations[] |
object (Invitation )
该账号待处理的营业地点邀请集合。此处列出的邀请数不能超过 1000。
|
授权范围
需要以下 OAuth 范围之一:
https://www.googleapis.com/auth/plus.business.manage
https://www.googleapis.com/auth/business.manage
如需了解详情,请参阅 OAuth 2.0 概览。
TargetType
枚举 |
ALL |
列出针对所有目标类型的邀请。这是默认值。 |
ACCOUNTS_ONLY |
仅针对“账号”类型的目标列出邀请。 |
LOCATIONS_ONLY |
仅列出针对“地理位置”类型的目标的邀请。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eThis endpoint retrieves pending invitations for a specified Google My Business account.\u003c/p\u003e\n"],["\u003cp\u003eIt allows filtering by target type (Account or Location) using the \u003ccode\u003etargetType\u003c/code\u003e query parameter.\u003c/p\u003e\n"],["\u003cp\u003eThe response includes a list of invitations with details, limited to a maximum of 1000.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization is required using specific OAuth scopes related to business management.\u003c/p\u003e\n"],["\u003cp\u003eThis endpoint is deprecated; consider using the Account Management API instead.\u003c/p\u003e\n"]]],["This document outlines the process of listing pending invitations for a specified account using the deprecated API. It uses a `GET` request to `https://mybusiness.googleapis.com/v4/{parent=accounts/*}/invitations`. The `parent` path parameter specifies the account. The `targetType` query parameter filters invitation types. An empty request body is required. The response returns a JSON array of `invitations`, each represented as an object. The request needs either the `plus.business.manage` or `business.manage` authorization scope. Three types are available: ALL, ACCOUNTS_ONLY and LOCATIONS_ONLY.\n"],null,["# Method: accounts.invitations.list\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.ListInvitationsResponse.SCHEMA_REPRESENTATION)\n- [Authorization Scopes](#body.aspect)\n- [TargetType](#TargetType)\n\n| Deprecated. Please use the [Account Management API](https://developers.google.com/my-business/reference/accountmanagement/rest/v1/accounts.invitations/list) instead.\nLists pending invitations for the specified account.\n\n### HTTP request\n\n`GET https://mybusiness.googleapis.com/v4/{parent=accounts/*}/invitations`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|-----------------------------------------------------------------------------------------|\n| `parent` | `string` The name of the account from which the list of invitations is being retrieved. |\n\n### Query parameters\n\n| Parameters ||\n|--------------|----------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `targetType` | `enum (`[TargetType](/my-business/reference/rest/v4/accounts.invitations/list#TargetType)`)` Specifies which target types should appear in the response. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body contains data with the following structure:\nResponse message for AccessControl.ListInvitations.\n\n| JSON representation ||\n|------------------------------------------------------------------------------------------------------------|---|\n| ``` { \"invitations\": [ { object (/my-business/reference/rest/v4/accounts.invitations#Invitation) } ] } ``` |\n\n| Fields ||\n|-----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `invitations[]` | `object (`[Invitation](/my-business/reference/rest/v4/accounts.invitations#Invitation)`)` A collection of location invitations that are pending for the account. The number of invitations listed here cannot exceed 1000. |\n\n### Authorization Scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/plus.business.manage`\n- `https://www.googleapis.com/auth/business.manage`\n\nFor more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2).\n\nTargetType\n----------\n\nThe type of target an invitation is for.\n\n| Enums ||\n|------------------|-------------------------------------------------------------|\n| `ALL` | List invitations for all target types. This is the default. |\n| `ACCOUNTS_ONLY` | List invitations only for targets of type Account. |\n| `LOCATIONS_ONLY` | List invitations only for targets of type Location. |"]]