Direct message: 404 error while sending from server


We are implementing DM for some app invite purpose. For that purpose we are using “twitter4j” and also tried with “spring social plugin for twitter”. Although we are getting authenticated twitter object but getting error “403” from both the api.
Please note, we have provided permission “Read, write, and direct messages (modify app permissions)” to using application. I have also checked request url and that is fine “”. Please suggest…


I am facing the same issue now . I am using spring social twitter and it was working fine a month back. Now i am not able to send the messages. It gives me an error Resource not found exception and so unable to send the messages.


My mistake, i have used the wrong method in spring social . I was trying to use twitter id to send message but the method has string as a parameter which will consider the value i give as ‘screen_name’ Using the method which uses twitter id resolved the issue.

I had to use

twitter.directMessageOperations().sendDirectMessage(long twitter_id,String msg)

but i used

twitter.directMessageOperations().sendDirectMessage(String screen_name,String msg)

which was the issue