skip to Main Content

I am sending message by using direct_messages/events/new method in Node.js by using API,

But i am getting the errors like { code: 349, message: ‘You cannot send messages to this user.’ }

please help me to solve this issue.

Thanks

2

Answers


  1. If the user is not following you or has blocked you, then you will not be able to send messages to the user.

    Login or Signup to reply.
  2. You can also send messages to a user that is not following you but has DM’d you (e.g. if your id accepts DMs without requiring mutual following). However, if the user is not following you/has blocked you (as mentioned by Andy Piper) or has not DM’d you, you’ll receive the “code: 349, message: ‘You cannot send messages to this user.'” error. Tested via postman using the direct message api (https://api.twitter.com/1.1/direct_messages/events/new.json).

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search