When trying to update a contact in Google People API to add a profile image (/v1/people/{{RessourceName}}/:updateContactPhoto PATCH), I keep having a 400 error: Invalid photo format. Do you have any idea what am I doing wrong or what exactly this error message could mean ?
Here is an example of the request body:
{
"photoBytes": "aHR0cHM6Ly9zMy51cy13ZXN0LTIuYW1hem9uYXdzLmNvbS9zZWN1cmUubm90aW9uLXN0YXRpYy5jb20vN2ZkNmY2YzMtZDM1Yi00YTUzLTkyMTItYjA5Y2JmMWE1NjBjL3RsY2hhcmdlbWVudC5qcGc/WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ29udGVudC1TaGEyNTY9VU5TSUdORUQtUEFZTE9BRCZYLUFtei1DcmVkZW50aWFsPUFLSUFUNzNMMkc0NUVJUFQzWDQ1JTJGMjAyMjAzMjIlMkZ1cy13ZXN0LTIlMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjIwMzIyVDE4MTIxMlomWC1BbXotRXhwaXJlcz0zNjAwJlgtQW16LVNpZ25hdHVyZT04ZGU4OGI2ZTU0NGQ2NTRjNGE0ODhhOTljMTljZjcxNDEyOTk5OWQ2NGQ3YzgwYmZkY2Y1ODYyNDcwMmQxNzFjJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZ4LWlkPUdldE9iamVjdA==",
"personFields": "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,fileAses"
}
I have tried both with content-type "multipart/form-data" and "application/json" but I does not change anything.
This is a typical response body I keep having but I do not know how to interpret it:
{
"error": {
"code": 400,
"message": "Invalid photo format",
"status": "INVALID_ARGUMENT"
}
}
Can you please help me into solving this issue, please ?