Forum Discussion

satya's avatar
satya
Expert
8 years ago

Upload Image to Album on behalf of user through API

Hi,

 

We are trying to upload an image into user album on behalf of the user through API call.Following is the API call we have used: "/restapi/vc/users/login/[login] /media/albums/default/public/images/upload"

But it is throwing following error:

 

{"response":{"status":"error","error":{"code":303,"message":"User *ID* does not have the following permission(s) at *Domain* [ ]"}}}

We called this API with admin user session key.

Appreciate your help on this.

 

Thanks

Srujana Satya Datla.

  •  

    Hi Satya,

    To upload an image into user album on behalf of user, you have to grant the 'upload image' permission to user in admin section.

     

     

     

    Thanks,

    Payal

     

    • satya's avatar
      satya
      Expert

      Hi Payal ,

       

      The permission is grant to 'upload image' for the User. But we are still facing the issue .

  • Hello,

     

    Me too facing same issue. Have you got any solution.

     

     

    Thanks

    • satya's avatar
      satya
      Expert

      Hi vivek,

       

      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.

       

      Give kudos if you find my posts helpful or mark as solution if it answers your query.

      Thanks,
      Srujana Satya