[Authorization] Cannot get token with Oauth authentication
Hi,
I try to use the code in the official documentation to get the OAuth token
https://github3.readthedocs.io/en/latest/examples/oauth.html
but with failure.
authorize function is not available in github3 module.
I try with this script
from github3 import GitHub
gh = GitHub()
note = 'github3.py example app'
note_url = 'http://example.com'
scopes = ['user', 'repo']
gh.authorize(username="salvorapi", password="************",scopes=scopes, note=note, note_url=note_url)
salvorapi = gh.me()
print(salvorapi.name)
print(salvorapi.login)
Thanks, Salvo.
Please provide information about what version of github3.py you have installed, how you installed it, and the exact exception / stack trace you're seeing.
https://github3.readthedocs.io/en/latest/api-reference/github.html#github3.github.GitHub.authorize authorize is a method on the GitHub object
Also if I remember correctly GitHub removed this API at some point but we haven't gotten around to pruning the methods and objects