Why is my Twitter bot not authenticating while creating bot?

Viewed 14

why I am always getting authentication error while creating bot for twitter. Though I am using correct keys. Below is the code:-

auth = tweepy.OAuthHandler("XXXX", "XXX")
auth.set_access_token("C-HmO3PQt0Z1X44FY9v9jmk53rL7x5xB", "VCCCC")
api = tweepy.API(auth, wait_on_rate_limit = True)

try:
    api.verify_credentials()
    print("Authentication Successful")
except:
    print("Authentication Error")
0 Answers
Related