I wrote a script using a Laravel package (https://github.com/thujohn/twitter) to send direct messages to my followers. So far it’s worked great. Today it sent about 40 messages, and suddenly failed.
After some investigation I found that I was getting an  Invalid or expired token error. I checked my app and found my access tokens had vanished. So I regenerated them, updated my app, and tried to resume. Same thing, after about 40 messages, it started returning the same error.
I checked again, and the tokens I had just generated are gone. Why would this happen?