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"}
2
Answers
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.
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).