Skip to content

Instantly share code, notes, and snippets.

@Emekaborisama
Created June 8, 2022 06:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Emekaborisama/0159b0e9220483c8716c86c213b20346 to your computer and use it in GitHub Desktop.
Save Emekaborisama/0159b0e9220483c8716c86c213b20346 to your computer and use it in GitHub Desktop.
import tweepy as tp
#auth for twitter api
auth = tp.OAuthHandler('xxxxxxxxx', 'xxxxxxx')
auth.set_access_token('xxxx-xxxxx', 'xxxxxx')
api = tp.API(auth, wait_on_rate_limit=False)
try:
api.verify_credentials()
print("Authentication done")
except:
print("Error during authentication")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment