发布更新到Buffer API错误-“请选择至少一个要发布的帐户" [英] Post update to Buffer API error - "Please select at least one account to post from"
问题描述
我正在扩展一个应用程序,以包括使用Buffer API向社交媒体进行半自动发布的功能.我在将更新发布到Buffer时遇到问题.
使用邮递员来使用该API,一切都已成功通过身份验证,并且我可以POST
更新时,我总是收到返回错误"Please select at least one account to post from"
的信息.
将所需的参数添加到邮递员后,我有以下请求URL,该请求失败:
https://api.bufferapp.com/1/updates/create.json?pretty=true&access_token=1/XXXXXXXXXXXXX&profile_ids[]=XXXXXXXXXXXX&text=This is an update
在阅读此 Twitter线程之后,我也尝试了以下运气不好的事情:>
https://api.bufferapp.com/1/updates/create.json?pretty=true&access_token=1/XXXXXXXXXXXXX&profile_ids%5B%5D=XXXXXXXXXXXX&text=This is an update
完整的错误/响应是:
{
"success": false,
"message": "Please select at least one account to post from.",
"code": 1004
}
相关文档位于此处.
我俯瞰什么?我偷偷地怀疑这是我没看到的简单事情.
非常感谢您的帮助:)
您是否尝试过将POST数据而不是URL放入请求的正文中?例如:
HTTP/POST https://api.bufferapp.com/1/updates/create.json
Content-Type: application/x-www-form-urlencoded
pretty=true&access_token=1/XXXXXXXXXXXXX&profile_ids[]=XXXXXXXXXXXX&text=This is an update
I'm extending an app to include semi automatic posting to social media using the Buffer API. I'm having trouble posting the update to Buffer.
Using Postman to play around with the API, everything is authenticated successfully and I'm able to GET
anything I need, however, I keep getting the error "Please select at least one account to post from"
returned when trying to POST
an update.
After adding the required params to postman, I have the following request URL, which fails:
https://api.bufferapp.com/1/updates/create.json?pretty=true&access_token=1/XXXXXXXXXXXXX&profile_ids[]=XXXXXXXXXXXX&text=This is an update
After reading this twitter thread, I have also tried the following with no luck:
https://api.bufferapp.com/1/updates/create.json?pretty=true&access_token=1/XXXXXXXXXXXXX&profile_ids%5B%5D=XXXXXXXXXXXX&text=This is an update
The full error / response is:
{
"success": false,
"message": "Please select at least one account to post from.",
"code": 1004
}
The related documentation is here.
What am I overlooking? I have a sneaking suspicion that it's something simple I'm not seeing.
Any help is much appreciated :)
Have you tried putting the POST data in the body of the request, rather than the URL? e.g:
HTTP/POST https://api.bufferapp.com/1/updates/create.json
Content-Type: application/x-www-form-urlencoded
pretty=true&access_token=1/XXXXXXXXXXXXX&profile_ids[]=XXXXXXXXXXXX&text=This is an update
这篇关于发布更新到Buffer API错误-“请选择至少一个要发布的帐户"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!