Skip to main content
Answered

The avatar attribute does not work for me

  • October 12, 2022
  • 6 replies
  • 164 views

I am using react native and I am using the following code:

 

Intercom.updateUser({

  email: userInfo.email ?? '',

  userId: userInfo.id,

  name: (userInfo && userInfo.first_name) ?? '',

  phone: userInfo.phones[0].number,

  avatar: 'https://www.w3schools.com/howto/img_avatar.png',

  custom_attributes: {

     date_of_birth: userInfo.dob ?? '',

     user_connected_from: App'

  }

})

 

EVERYTHING, absolutely everything works, except the avatar attribute, could you please tell me how to make that image be my client's profile picture here in the red circle? Thank you.

where it should go profile image

Best answer by Zak

Hey! Sorry for the delay, missed this one.

 

So I was testing this and thought I ran into a big issue with a bug where updating would create a new account instead of updating the existing, but realized I was sending a POST request instead of PUT haha.

 

I'm not familiar with coding in react unfortunately, however I've tested sending an API request to update a profile and was able to successfully update the profile image. I even used the one you provided just to test, so that works fine.

 

So API wise it appears to be okay, but perhaps this is an issue unique to using it via react? Could you try and perform the same command via a regular API request instead to see if you have the same issue?

View original
Did this topic help you find an answer to your question?

6 replies

Forum|alt.badge.img+1
  • Active User
  • 37 replies
  • October 13, 2022

Around the URL you have single quotes; can you try change it to double quotes and see if that makes any difference?


  • Author
  • New Participant
  • 2 replies
  • October 13, 2022

Hello.

Still not working, does it work for you?


Diana Tripac
Intercom Team
Forum|alt.badge.img+2
  • Senior Community Program Manager @Intercom
  • 151 replies
  • October 20, 2022

Hi @zak p​ , just wondering if you can further advise the user on this matter. 🙌


Forum|alt.badge.img+1
  • Active User
  • 37 replies
  • Answer
  • October 21, 2022

Hey! Sorry for the delay, missed this one.

 

So I was testing this and thought I ran into a big issue with a bug where updating would create a new account instead of updating the existing, but realized I was sending a POST request instead of PUT haha.

 

I'm not familiar with coding in react unfortunately, however I've tested sending an API request to update a profile and was able to successfully update the profile image. I even used the one you provided just to test, so that works fine.

 

So API wise it appears to be okay, but perhaps this is an issue unique to using it via react? Could you try and perform the same command via a regular API request instead to see if you have the same issue?


  • Author
  • New Participant
  • 2 replies
  • October 24, 2022

Thank you very much for your response.

 

I have been to support and they told me the same as you said and it worked fine with the api request. But I need it with react native.

 

Apart from that because they ask for an external_id to do the avatar update in the api, but I don't have that with Intercom in react native, which means building another additional call from the users....

 

The right thing would be that obviously it would work from the library they have created for react native, that's what it was created for. 

 

Here is the documentation about react native

https://developers.intercom.com/installing-intercom/docs/react-native-configuration/p>


Brandon Foret
  • New Participant
  • 3 replies
  • January 14, 2024

I can’t seem to find the correct attribute key to update this information through Zapier


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings