Forum Discussion

Pradnya's avatar
Pradnya
Guide
8 years ago

Is there any way to add avatar images from another source to lithium album using REST Api call ?

I want REST Api call to add images from different source into Lithium avatar album without uploading it manually. 

5 Replies

  • Hi Pradnya

     

    We have looked for the same requirement too. But got to know that we will not have permissions to upload an image into user album on behalf of the user through API call. It is lithium default behavior. So in our use case, we manually uploaded the images.

     

    Please look into the link we have asked in the community.

     

    Hope this helps :)

  • PradnyaI believe you can #1 upload a image to your photo album and get the image object via API v1. #2 Then you can set the image object to your avatar.

    For #1, I believe it is doable. /restapi/vc/users/self/media/albums/default/public/images/upload
    For #2, you will have to try it. /users/id/${user.id}/profiles/name/url_icon/set?value=xxxxx, for the syntax of xxxxx, you will have to try or ask Lithium.

  • Pradnya's avatar
    Pradnya
    Guide
    8 years ago

    Hi,

     

    Could I upload avatar images in the avatar album on behalf of other users,

    that is by using ${user.id} instead of "self" ?

     

     

    Thanks