Method: contactGroups.get
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-08-06。
[null,null,["最后更新时间 (UTC):2024-08-06。"],[[["\u003cp\u003eRetrieve a specific contact group owned by the authenticated user using its resource name.\u003c/p\u003e\n"],["\u003cp\u003eCustomize the request to limit returned members or specify fields using query parameters like \u003ccode\u003emaxMembers\u003c/code\u003e and \u003ccode\u003egroupFields\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe response will contain details of the specified contact group, including metadata, group type, and member count.\u003c/p\u003e\n"],["\u003cp\u003eRequires authorization using scopes such as \u003ccode\u003ehttps://www.googleapis.com/auth/contacts\u003c/code\u003e or \u003ccode\u003ehttps://www.googleapis.com/auth/contacts.readonly\u003c/code\u003e.\u003c/p\u003e\n"]]],["This document outlines how to retrieve a specific contact group. The process involves sending a `GET` request to `https://people.googleapis.com/v1/{resourceName=contactGroups/*}`. The `resourceName`, the identifier of the group, is a required path parameter. Optional query parameters include `maxMembers` to limit returned members, and `groupFields` to specify the data returned. The request body must be empty. A successful response returns a `ContactGroup`. Authorization requires either `contacts` or `contacts.readonly` scopes.\n"],null,["# Method: contactGroups.get\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- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nGet a specific contact group owned by the authenticated user by specifying a contact group resource name.\n\n### HTTP request\n\n`GET https://people.googleapis.com/v1/{resourceName=contactGroups/*}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------------|-------------------------------------------------------------------|\n| `resourceName` | `string` Required. The resource name of the contact group to get. |\n\n### Query parameters\n\n| Parameters ||\n|---------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `maxMembers` | `integer` Optional. Specifies the maximum number of members to return. Defaults to 0 if not set, which will return zero members. |\n| `groupFields` | `string (`[FieldMask](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask)` format)` Optional. A field mask to restrict which fields on the group are returned. Defaults to `metadata`, `groupType`, `memberCount`, and `name` if not set or set to empty. Valid fields are: - clientData - groupType - memberCount - metadata - name |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body contains an instance of [ContactGroup](/people/api/rest/v1/contactGroups#ContactGroup).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/contacts`\n- `https://www.googleapis.com/auth/contacts.readonly`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]