Twitter returns 401 not authorized after about 6 hours?


I have a Python 3.3 script that repeatedly calls the Twitter API function /followers/ids. (I use this library:

The script always keeps within the Twitter rate limits (15 calls then 15 minutes pause,…) but nevertheless, after about 6 hours Twitter always starts returning status 401 “not authorized” for every request. What could be the reason for this? Am I doing something wrong?