Method: contactGroups.members.modify
Оптимизируйте свои подборки
Сохраняйте и классифицируйте контент в соответствии со своими настройками.
Если не указано иное, контент на этой странице предоставляется по лицензии Creative Commons "С указанием авторства 4.0", а примеры кода – по лицензии Apache 2.0. Подробнее об этом написано в правилах сайта. Java – это зарегистрированный товарный знак корпорации Oracle и ее аффилированных лиц.
Последнее обновление: 2024-10-25 UTC.
[null,null,["Последнее обновление: 2024-10-25 UTC."],[[["\u003cp\u003eModify the members of a contact group owned by the authenticated user using the \u003ccode\u003ePOST\u003c/code\u003e method and providing resource names to add or remove.\u003c/p\u003e\n"],["\u003cp\u003eThe request body should contain two optional fields: \u003ccode\u003eresourceNamesToAdd\u003c/code\u003e and \u003ccode\u003eresourceNamesToRemove\u003c/code\u003e, specifying the contact people to add or remove, respectively.\u003c/p\u003e\n"],["\u003cp\u003eThe response body may include lists of \u003ccode\u003enotFoundResourceNames\u003c/code\u003e and \u003ccode\u003ecanNotRemoveLastContactGroupResourceNames\u003c/code\u003e for unsuccessful operations.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization requires the \u003ccode\u003ehttps://www.googleapis.com/auth/contacts\u003c/code\u003e scope.\u003c/p\u003e\n"],["\u003cp\u003eSystem contact groups like \u003ccode\u003econtactGroups/myContacts\u003c/code\u003e and \u003ccode\u003econtactGroups/starred\u003c/code\u003e allow member addition, while others are deprecated and only support removal.\u003c/p\u003e\n"]]],["This describes modifying members in a user's contact group via a `POST` request to `https://people.googleapis.com/v1/{resourceName=contactGroups/*}/members:modify`. The `resourceName` (contact group's identifier) is required in the path. The request body uses JSON to specify `resourceNamesToAdd` and `resourceNamesToRemove` which can be `people/{person_id}`. `myContacts` and `starred` can add members. The response body contains `notFoundResourceNames` and `canNotRemoveLastContactGroupResourceNames` using JSON. The API uses OAuth scope `https://www.googleapis.com/auth/contacts`.\n"],null,["# Method: contactGroups.members.modify\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n - [JSON representation](#body.ModifyContactGroupMembersResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nModify the members of a contact group owned by the authenticated user.\n\nThe only system contact groups that can have members added are `contactGroups/myContacts` and `contactGroups/starred`. Other system contact groups are deprecated and can only have contacts removed.\n\n### HTTP request\n\n`POST https://people.googleapis.com/v1/{resourceName=contactGroups/*}/members:modify`\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 modify. |\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|-----------------------------------------------------------------------------------|\n| ``` { \"resourceNamesToAdd\": [ string ], \"resourceNamesToRemove\": [ string ] } ``` |\n\n| Fields ||\n|---------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `resourceNamesToAdd[]` | `string` Optional. The resource names of the contact people to add in the form of `people/{person_id}`. The total number of resource names in `resourceNamesToAdd` and `resourceNamesToRemove` must be less than or equal to 1000. |\n| `resourceNamesToRemove[]` | `string` Optional. The resource names of the contact people to remove in the form of `people/{person_id}`. The total number of resource names in `resourceNamesToAdd` and `resourceNamesToRemove` must be less than or equal to 1000. |\n\n### Response body\n\nThe response to a modify contact group members request.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------|\n| ``` { \"notFoundResourceNames\": [ string ], \"canNotRemoveLastContactGroupResourceNames\": [ string ] } ``` |\n\n| Fields ||\n|-----------------------------------------------|--------------------------------------------------------------------------------------------------|\n| `notFoundResourceNames[]` | `string` The contact people resource names that were not found. |\n| `canNotRemoveLastContactGroupResourceNames[]` | `string` The contact people resource names that cannot be removed from their last contact group. |\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/contacts`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]