Forum Discussion

allensmith81's avatar
7 years ago

Upload an Image on behalf of another USER - Community RESTAPIv1

Hi all,

 

I am writing a script to import a wordpress blog. I have hit a problem with uploading the images from the wordpress blog into lithium. If I upload them all to the API user gallery that works fine but i'd really like to upload them to the user who posted the blogs gallery.

 

The API User is an Administrator yet everytime I place the following call:

 

https://<stageserver.com>/restapi/vc/users/id/259/media/albums/default/public/images/upload

I get a response code of 303 - and an error message of User 289 does not have the following permissions etc

 

289 is the API User.. is there some special trick to posting an image to another user's gallery that I am not getting?

5 Replies