我们计划制作Podio Out of Office扩展程序,以便人们可以添加开始日期和结束日期,并且在此期间,个人资料图片将自动更改为不在办公室版本。
我们无法在Podio API文档中看到一种方法,并根据official comment here尝试了解决方案。
但是这种方法现在还不行。这是我们收到的错误
有关如何执行此操作的任何帮助?
答案 0 :(得分:4)
请尝试使用https而不是http,并尝试使用PUT而不是POST。
curl -H "Content-Type: application/json"
-H "Authorization: OAuth2 <my_auth_token>"
-X PUT
-d '{"avatar":<avatar_id>}'
"https://api.podio.com/contact/<profile_id>"
整个解决方案:
GET /contact/user/{user_id}
(让我们调用结果p
)p.image.link
获取用户头像(应为网址)image_id
PUT
至/contact/{p.profile_id}
值{"avatar" : <image_id>}