ABBOV
#1
Hi,
Fairly new to Twitter development, trying to send a tweet from a python script. Used the ‘out of the box’ solution of create_tweet.py. Inserted my token and secret and the first tweet was sent! 
Unfortunately this only worked once, after the first successful tweet the script keeps asking for the app authorization, After entering the PIN succesfully (over and over again) the script ends in the error shown below:
Exception: Request returned an error: 429 {"title":"Too Many Requests","detail":"Too Many Requests","type":"about:blank","status":429}
Therefore two questions:
- Is the authorisation necessary every time the script runs?
- The 429 error hints towards a rate limit, how can it be a rate limit when there is only 1 tweet send?
Any thoughts?
ABBOV
No, the example takes you step by step through the whole process, once you have the access token and secret you can save them somehow continue to reuse them, and oad them same way as the consumer key, so you can get rid of all of this Twitter-API-v2-sample-code/create_tweet.py at 711e26d9383358c580079d8ad1b3245383cd9719 · twitterdev/Twitter-API-v2-sample-code · GitHub
I don’t know why you’d be getting a rate limit, but sometimes the limit is your account limit - not your app. So you may have already tweeted too much using other ways.
ABBOV
#3
Thanks for answering my first question, I commented out the suggested section and this indeed skips the authentication request, so the ‘429’ is my only problem at the moment.
This is my first project and therefore first App, so the ‘429’ is totally unexpected. I’ll keep searchig/ 
ABBOV
#4
Small update, but still confused. I keep getting the ‘429’ response, but the returning header tells me there is no problem? See the screenshot for reference.
Any thoughts?