Get Tweepy 0auth Code



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)
print(f"consumer_key = '{consumer_key}'")
print(f"consumer_secret = '{consumer_secret}'")
print(f"access_key = '{access_key}'")
print(f"access_secret = '{access_secret}'")

Thanks for reading. x

Resources