Answered

Why is my contact (user) avatar showing null on update?

  • 21 July 2022
  • 1 reply
  • 85 views

Hi,

 

I'm using the API v2.5 to update a contact as per the docs: https://developers.intercom.com/intercom-api-reference/reference/update-contact/p>

 

This works fine, but for some reason, when I try to update the contact's "avatar" field I've run into this weird issue:

 

If I update with this URL it works fine: "https://img.icons8.com/material/344/user-male-circle--v1.pngquot;.

 

But if I update with this URL, the update succeeds but the avatar field is set to null: "http://res.cloudinary.com/paind/image/upload/v1658396160/user-avatars/zyzlejwogq0oua4nmgwu.jpgquot;

 

If I try a few different URLs, it seems that all my "res.cloudinary.com" URL strings result in your API setting a null value. My user avatars are hosted on Cloudinary, so this is a problem. I can't see why this is the case! Are you validating more than just string data type? String length? Excluding Cloudinary URLs for some reason?

 

Please help!

 

You should be able to recreate using a test API call with any auth token on any contact update, using my strings above.

 

Thanks

 

Greg

icon

Best answer by Greg H 21 July 2022, 12:16

View original

1 reply

I've answered my own question :)

 

Turns out the avatar URL string is being validated for "http" which should be "https" apparently. Using any "http" url string is being nullified. Would be nice to see this in the developer docs.

Reply