Method: contactGroups.get
Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2024/08/06 (UTC).
[null,null,["Dernière mise à jour le 2024/08/06 (UTC)."],[[["\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)."]]