Hi,
I am using the following data set for direct message API via postman. But I do not get any response either success or error. and message is also not post. I have uses Oauth 1.0 authorization in postman.
end point: https://api.twitter.com/1.1/direct_messages/events/new/
data set is as followes:
{ "event": { "type": "message_create", "message_create": { "target": { "recipient_id": "recipient_id" }, "message_data": { "text": "I think yer swell!" } } } }
Are you setting the right Content-Type for the request? Are you doing a POST?
Content-Type
Yes. I was set the method in POST and Content-Type was application json
AND Authorisation parameter was as below
Consumer key consumer secret Token token secret Signature method timestamp nonce version
Ok this is definitely odd, you get no response at all in Postman?
Yes. I do not get any response.
May you give me a valid example which I cam follow?
Your example looks exactly right, although obviously the recipient_id would need to match a valid Twitter user ID.
recipient_id
Hey @Kalyan10825133 - At what time were you experiencing this?
hi,
I have used valid recipient_id. And all credentials take from my app setting and the result is same.
Anything details you need more?
Please reply and give me a proper solution.
Can I send Direct message to anyone or only who are following me?
This has always only been to users following the sender, unless the recipient has “accept DMs from anyone” enabled, and no there’s no way to check that via the API.
Hamza
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.