Hi.
When I destroy a friendship using the Twitter REST API, instantly my app’s access token is deleted from the https://apps.twitter.com/app/XXXXX/keys page and I’m stuck with what to do next.
Strangely, the destroy works once, before the access token is deleted and invalid token errors are thrown in my app from there.
Recreating a new access token works, before again destroying the first friendship and then deleting the access token.
Doing other GET or POST requests works fine.
I’ve tried recreating the consumer key / secret but the issue persists.
My thanks to anyone who can point me in the right direction.
EDIT: Possible cause? I was coding a loop to destroy followers. I have 5000 followers which may have been processed. Any lets say I ran it five times, perhaps making 25000 quick calls to friendship/destroy.
While this exceeds the API limits and justifies the access token being revoked - I’m using new tokens that I recreated which I hope wouldn’t be impacted. The destroy is also successful - once, before the access token is revoked.
Is it possible I’m rate limited on that particular endpoint, and it may work in the future?