Since Twitter doesn’t provide with a “Delete All Direct Messages” functionality, Here’s a Python script that attempts to delete all the direct messages stored on your Twitter account.
Limitations
The only problem with it is that given the limitations of the Twitter REST API, I was forced to send a request per message to be deleted, and it seems that Twitter will only allow 100 requests per hour (per client).
So in theory you will be able to delete 100 an hour, although I have seen it delete over 400 messages Twitter gets all grumpy on me.
Usage
Just save the script as twitter_delete_direct_messages.py, open a terminal and run it:
[bash]python twitter_delete_direct_messages.py[/bash]
After that just follow the instructions on screen and enjoy as messages get wiped out.
If you find this useful, you can thank me by following me on Twitter.
That code is good, because I delete one by one jejeje. Thanks
twitter.com/niro
That code is good, I delete one by one of my direct messages jejeje
twitter.com/niro
Tried it but got a syntax error on line 44, it has to do with the return page from twitter.