Question

ODATA Contact Photo

Hi community

 

I tried to download a picture contact using odata using this end-point {{BaseURI}}/0/odata/Contact({{ContactId}})/ContactPhoto

but I receive HTTP 204 response.

The contact has a picture attached

What I'm doing wrong?

Like 0

Like

4 comments

Hi Stefano,

 

Please specify if you are trying to get the photo from the contact or post the photo to the contact. It's not clear from the description of the question.

 

Best regards,

Oscar

Oscar Dylan,

I'm trying to download the picture

Stefano Bassoli,

 

what you need to do is to call /0/odata/SysImage({Id here})/Data endpoint. And Id should be received from the "PhotoId" column value received when calling 0/odata/Contact({{ContactId}}). Here is an example for accounts from my local app:

 

1) Retrieve PhotoId from the contact:

2) Call this endpoint:

http://r_rak_n:3269/0/odata/SysImage(199f4e47-985b-41ee-91c5-dec7e4f45a5e)/Data

 

199f4e47-985b-41ee-91c5-dec7e4f45a5e - is the PhotoId from step 1.

 

Best regards,

Oscar

Oscar Dylan,

Thank you very much!

Show all comments