Create get_consumer_keys.py

This commit is contained in:
5vl 2023-04-06 21:28:28 +02:00 committed by GitHub
parent c9129690f1
commit c99843fd24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

15
get_consumer_keys.py Normal file
View File

@ -0,0 +1,15 @@
import tweepy
oauth1_user_handler = tweepy.OAuth1UserHandler(
"API_KEY", "API_SECRET",
callback="CALLBACK_URL"
)
print(oauth1_user_handler.get_authorization_url(signin_with_twitter=True))
code = input("Enter verifier: ")
access_token, access_token_secret = oauth1_user_handler.get_access_token(code)
print("Consumer key: " + access_token)
print("Consumer secret: " + access_token_secret)