Attempt to send a DM, get 151 Error Code but DM is still sent


Occasionally when calling the POST direct_messages/new endpoint I get the following error:

Twitter Error: 403:The request is understood, but it has been refused. An accompanying error message will explain why. This code is used when requests are being denied due to update limits (
message - There was an error sending your message: Whoops! You already said that.
code - 151

The problem is it seems the DM actually seems to goes through. The published date of the DM is the exact same as when the application made the call. Then the user retries a couple of minutes later because the application reported an error the 1st time and the DM gets sent a 2nd time.


Has no one else seen this behavior? I have combed through our logs, I am pretty sure we are not publishing the DM twice.


We are getting the same error for sending DM.
Even though the message is getting sent the error message come with the 151 error code as same as mentioned above.

We have checked our side.
Here is the code snippet that we are using to send DM.

    try {
       DirectMessage message = twitter.sendDirectMessage(ScreenName Of User, Message Text);
        return "success";
    } catch (Exception e) {
        return "Failed";

Any Solution for this?


Any Update regarding this Issue?
Still facing the same error :disappointed_relieved:


We’re still working on this behind the scenes - nothing to report at the moment I’m afraid.


Hello Is there any outcome for this issue… so that we can think of implement it future… :fearful:


We know how to resolve, but there are some additional things in progress around DMs at the moment. Sorry that it has taken so long, sometimes these things get caught up in other work! There’s no change at the moment, though.


Quick update - still looking into this intermittent issue but no change as yet. This is actively been worked on, but got shuffled around in our priority list.


This issue has been resolved.