Method: contactGroups.list
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2024-08-21 UTC.
[null,null,["Ultimo aggiornamento 2024-08-21 UTC."],[[["\u003cp\u003eLists all contact groups owned by the authenticated user, without populating group members.\u003c/p\u003e\n"],["\u003cp\u003eAllows for pagination and filtering of results using query parameters such as \u003ccode\u003epageToken\u003c/code\u003e, \u003ccode\u003epageSize\u003c/code\u003e, \u003ccode\u003esyncToken\u003c/code\u003e, and \u003ccode\u003egroupFields\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eRequires authorization with either \u003ccode\u003ehttps://www.googleapis.com/auth/contacts\u003c/code\u003e or \u003ccode\u003ehttps://www.googleapis.com/auth/contacts.readonly\u003c/code\u003e scopes.\u003c/p\u003e\n"],["\u003cp\u003eReturns a response containing an array of contact groups, total item count, and tokens for pagination and synchronization.\u003c/p\u003e\n"],["\u003cp\u003eThe request body should be empty and the response body contains contact group details in JSON format.\u003c/p\u003e\n"]]],["This describes how to list a user's contact groups via the People API. A `GET` request to `https://people.googleapis.com/v1/contactGroups` is made, with an empty request body. Optional query parameters (`pageToken`, `pageSize`, `syncToken`, `groupFields`) allow for pagination, syncing changes, and field restriction. The response includes an array of `contactGroups`, total item count, and tokens for subsequent pages or syncing. The operation requires specific authorization scopes.\n"],null,["# Method: contactGroups.list\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.ListContactGroupsResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nList all contact groups owned by the authenticated user. Members of the contact groups are not populated.\n\n### HTTP request\n\n`GET https://people.googleapis.com/v1/contactGroups`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Query parameters\n\n| Parameters ||\n|---------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `pageToken` | `string` Optional. The nextPageToken value returned from a previous call to [contactGroups.list](/people/api/rest/v1/contactgroups/list). Requests the next page of resources. |\n| `pageSize` | `integer` Optional. The maximum number of resources to return. Valid values are between 1 and 1000, inclusive. Defaults to 30 if not set or set to 0. |\n| `syncToken` | `string` Optional. A sync token, returned by a previous call to `contactgroups.list`. Only resources changed since the sync token was created will be returned. |\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\nThe response to a list contact groups request.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"contactGroups\": [ { object (/people/api/rest/v1/contactGroups#ContactGroup) } ], \"totalItems\": integer, \"nextPageToken\": string, \"nextSyncToken\": string } ``` |\n\n| Fields ||\n|-------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `contactGroups[]` | `object (`[ContactGroup](/people/api/rest/v1/contactGroups#ContactGroup)`)` The list of contact groups. Members of the contact groups are not populated. |\n| `totalItems` | `integer` The total number of items in the list without pagination. |\n| `nextPageToken` | `string` The token that can be used to retrieve the next page of results. |\n| `nextSyncToken` | `string` The token that can be used to retrieve changes since the last request. |\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)."]]