When the account can't create apps
import tweepy
consumer_key = "XXXX"
consumer_secret = "XXXX"
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.secure = True
auth_url = auth.get_authorization_url()
print(f'Go here: {auth_url}')
verifier = input('Enter PIN: ').strip()
auth.get_access_token(verifier)
access_token = auth.access_token
access_token_secret = auth.access_token_secret
print(f"consumer_key = '{consumer_key}'")
print(f"consumer_secret = '{consumer_secret}'")
print(f"access_key = '{access_token}'")
print(f"access_secret = '{access_token_secret}'")
api = tweepy.API(auth)
api.update_status("I'm a banana!")
Thanks for reading. x
Resources
- Python: https://python.org
- Tweepy: https://tweepy.readthedocs.io/en/latest