Unable to delete old tweets (api.destroy.status)



Hi there,
I specifically joined the community to get an answer :slight_smile: I have 22K tweets and want to delete most of my older tweets (2 years or more old) Manual deletion is a bear. I am using a self written piece of code (with api.destroy.status) and it worked fine on a test account. But now when I try it in my own account it is failing.
Some additional details which may help identify the issue quickly -

  1. I am using a csv file based on my archive data and using the tweet ids in there to destroy.
  2. I split the archive file in chunks of 500 tweets
  3. I tested my code on a test account and it worked like a charm (~150 tweets)
  4. I deleted the app on the test account and installed on my personal account 1st. I also deleted the app and reinstalled with a new name and tried it on my user account. Both failed. I wasn’t capturing the error code from the API. I probably should do this.
  5. If I was hitting rate limits won’t it give a more explicit message or (and I know I should do this) is it best that I catch the status of the destroy call or alternately use the get rate limit method?
  6. I am forcing it to authenticate 1st by not supplying the verify code up front.
  7. I tried to look up a sample tweet which failed to delete , manually, and it worked and I could delete it manually.
    8… None of the tweets I am attempting to delete show up on my timeline anymore - even though they do on my archive - since I have more than 3000 tweets since those.
    9 I am pretty handy with coding and python but don’t normally do dev stuff nor on twitter data lately.


Update. I figured out what was wrong and fixed it.
However, I am worried about a security issue. Noted 2 strange things:

  1. When editing my code to update with latest access and consumer key and secrets I noticed my vim editor flagged a status as “recording”
  2. Each time I successfully run my app, I notice a strange app I have NOT authorized show up in apps. Am I missing something or should I report this as a security concern to support?


Sounds like a general vim question.

That doesn’t sound right - when you say it shows up in apps, you mean in your account settings?


Thanks for the followup!
I noticed a slew of apps all named ErasedXXXXX where X is some arbitrarily
long numeric string (different each time) appear in the approved apps area
right after I run my own tweet delete script.
I also noted that they show up in last login list every day. (An example

Something that may be relevant: It is my practice to authorize my app, edit
my code to include the Access and Consumer key and secret , run my code and
then immediately deauthorize and delete my app from my account. In a nod to
some level of security . Unsure if the logins are related to that. However
I did see the ErasedXXXX apps as authorized a few times (not every time) I
ran my own code.

Best Regards
Miss Gitanjali Gulve Sehgal (Gigi)
Founder-CEO OhmPye - an experimental hearable startup
Cupertino, California

CONFIDENTIALITY NOTICE: This electronic transmission, including any
attachments, may contain confidential information which is privileged. The
privilege is not waived by virtue of this message having been sent by
e-mail. If you are not the intended recipient, you are prohibited from
disclosure, copying, distribution or use of this information in any manner.
If you received this information in error, please contact me immediately by
return e-mail or telephone call to the above number, and delete this
message from your system.