Retrieving messages from the twitter connecter resultes into 403

萝らか妹 提交于 2019-12-08 05:22:29

问题


I have successfully registered the twitter connector with my app and created a user. I'm able to send tweets and the test and info apis both work. Only when I try to retrieve messages the connector returns the following result:

{"Status":{"twitter":{"status":417,"info":"417 Connector returned error: 403 Forbidden"}},"messages":{"twitter":null}}

I send the request to /v2/message/retrieve with the following json body:

{"uri": "unified://twitter"}

回答1:


curl -XPOST https://apiv2.unificationengine.com/v2/message/retrieve -u USER_ACCESSKEY:USER_ACCESSSECRET --data "{\"uri\":\"unified://UNIQUE_CONNECTION_IDENTIFIER\"}" -k

Can you please check if the above command works for you? The 403 error is returned by twitter (https://dev.twitter.com/overview/api/response-codes).




回答2:


The problem was that my twitter app didn't have DM permissions. I just saw Read & write and thought that would be enough.

If someone has the same problem, go to your app settings, change the permissions and regenerate your personal access token.



来源:https://stackoverflow.com/questions/39233431/retrieving-messages-from-the-twitter-connecter-resultes-into-403

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!