Created
February 7, 2023 09:49
-
-
Save 0xDispatch/8ea8f1cea701c7209c2579a8a7608380 to your computer and use it in GitHub Desktop.
a simple python script to generate Access tokens using twitter official keys.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from requests_oauthlib import OAuth1 | |
#twitter official keys *Twitter for Android* | |
consumer_key = "3nVuSoBZnx6U4vzUxf5w" | |
consumer_secret = "Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys" | |
#change these to your user&pass | |
username = "NordsWarrior" | |
password = "NeverGonnaGiveYouUp" | |
oauth = OAuth1( | |
consumer_key,client_secret=consumer_secret | |
) | |
r = requests.post( | |
url="https://api.twitter.com/oauth/access_token", | |
auth=oauth, | |
data={ | |
'x_auth_mode': 'client_auth', | |
'x_auth_username': username, | |
'x_auth_password': password}) | |
print(r.content) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
these keys work as well.