Hi,
I would like an example of a PUT to update a user photo using the hipchat api. This request is not working:
PUT /v2/user/<username>@foo.com/photo?auth_token=SecretToken HTTP/1.1 Host: company.hipchat.com Content-Type: application/json Cache-Control: no-cache Postman-Token: 544e703b-d29a-69ce-04a8-51b47cb56405 [{ "photo" : { "_data" : "base64-encoded-data" } } ]
Hi Dave,
The following should work:
echo '{"photo": "' `base64 image.png` '"}' > image.json
curl -v -X PUT "https://<fqdn>/v2/user/2/photo?auth_token=<auth_token>" -H "Content-Type: application/json" --data @image.json
Notes:
I hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You're welcome, Dave.
Please mark my reply as an answer when you get a chance.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.