PHP Library: removePersonalPhoto and uploadPersonalPhoto

Options
Hi all,


I'm setting up a fundraising website using the convio PHP library to access TeamRaiser functions, and I've been able to get everything working except remove removePersonalPhoto and uploadPersonalPhoto. I'm able to make a call to both of these functions (POST using curl, with authorization token as the api requires) but I can't get them working as intended.


For removePersonalPhoto I'm able to call the function and receive the expected response back, but the image doesn't get deleted.


For uploadPersonalPhoto, I'm able to update captions but not upload images- the API gives the expected response back each time but images won't change.


If anyone's had experience with these two functions and how to get them working, I'd love to hear your thoughts and see what worked for you!


-Bri
Tagged:

Comments

  • For both of these methods, you need to set the Content-Type request header to "multipart/form-data". This is unlike most every other API method, which uses "application/x-www-form-urlencoded".
  • Noah Cooper:

    For both of these methods, you need to set the Content-Type request header to "multipart/form-data". This is unlike most every other API method, which uses "application/x-www-form-urlencoded".

    Thanks Noah- that did the trick! I've set up my code to set the Content-Type request header for multipart/form-data on these two api calls. Thanks for the quick response and help with this!

Categories