[英]Update Podio profile picture using API
We were planning to make a Podio Out of Office extension so people can add start and end date and the profile picture will be automatically changed with an out of office version in that period.我们计划制作一个 Podio Out of Office 扩展,以便人们可以添加开始和结束日期,并且个人资料图片将在此期间自动更改为不在办公室版本。
We cannot see a method to do that in Podio API documentation and tried the solution as per the official comment here .我们在 Podio API 文档中看不到这样做的方法,并根据此处的官方评论尝试了解决方案。
But that method is not working now.但是这种方法现在行不通了。 Here is the error we are receiving
这是我们收到的错误
Any help on how to do this?有关如何执行此操作的任何帮助?
Please try using https instead of http, and PUT instead of POST.请尝试使用 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>"
Whole solution:整体解决方案:
GET /contact/user/{user_id}
(let's call the result p
)GET /contact/user/{user_id}
(我们称结果为p
)p.image.link
(should be a URL)p.image.link
获取用户头像(应该是一个 URL)image_id
image_id
PUT
to /contact/{p.profile_id}
the value {"avatar" : <image_id>}
PUT
到/contact/{p.profile_id}
值{"avatar" : <image_id>}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.