Method: people.deleteContactPhoto
Stay organized with collections
Save and categorize content based on your preferences.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-08-06 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-08-06 UTC."],[[["\u003cp\u003eDeletes a contact's photo using the \u003ccode\u003eDELETE\u003c/code\u003e method and requires sequential requests for the same user.\u003c/p\u003e\n"],["\u003cp\u003eSpecify the contact using the \u003ccode\u003eresourceName\u003c/code\u003e path parameter and optionally control returned fields with \u003ccode\u003epersonFields\u003c/code\u003e and \u003ccode\u003esources\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eRequest body should be empty, and the response may include the updated person data if \u003ccode\u003epersonFields\u003c/code\u003e is used.\u003c/p\u003e\n"],["\u003cp\u003eRequires the \u003ccode\u003ehttps://www.googleapis.com/auth/contacts\u003c/code\u003e OAuth scope for authorization.\u003c/p\u003e\n"]]],["This document details how to delete a contact's photo via the People API. The `DELETE` request is sent to `https://people.googleapis.com/v1/{resourceName=people/*}:deleteContactPhoto`. The `resourceName` path parameter is required, specifying the contact. Optional query parameters include `personFields` for returned data and `sources` for source types. The request body is empty. A successful response contains an updated `person` object if the `personFields` query parameter is specified. Authorization requires the `https://www.googleapis.com/auth/contacts` scope.\n"],null,["# Method: people.deleteContactPhoto\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.DeleteContactPhotoResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nDelete a contact's photo.\n\nMutate requests for the same user should be done sequentially to avoid // lock contention.\n\n### HTTP request\n\n`DELETE https://people.googleapis.com/v1/{resourceName=people/*}:deleteContactPhoto`\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 whose photo will be deleted. |\n\n### Query parameters\n\n| Parameters ||\n|----------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `personFields` | `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 person are returned. Multiple fields can be specified by separating them with commas. Defaults to empty if not set, which will skip the post mutate get. Valid values are: - addresses - ageRanges - biographies - birthdays - calendarUrls - clientData - coverPhotos - emailAddresses - events - externalIds - genders - imClients - interests - locales - locations - memberships - metadata - miscKeywords - names - nicknames - occupations - organizations - phoneNumbers - photos - relations - sipAddresses - skills - urls - userDefined |\n| `sources[]` | `enum (`[ReadSourceType](/people/api/rest/v1/ReadSourceType)`)` Optional. A mask of what source types to return. Defaults to [READ_SOURCE_TYPE_CONTACT](/people/api/rest/v1/ReadSourceType#ENUM_VALUES.READ_SOURCE_TYPE_CONTACT) and [READ_SOURCE_TYPE_PROFILE](/people/api/rest/v1/ReadSourceType#ENUM_VALUES.READ_SOURCE_TYPE_PROFILE) if not set. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nThe response for deleting a contact's photo.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|----------------------------------------------------------------------|\n| ``` { \"person\": { object (/people/api/rest/v1/people#Person) } } ``` |\n\n| Fields ||\n|----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `person` | `object (`[Person](/people/api/rest/v1/people#Person)`)` The updated person, if personFields is set in the DeleteContactPhotoRequest; otherwise this will be unset. |\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)."]]