-
Notifications
You must be signed in to change notification settings - Fork 217
Open
Description
use oauth2.py to generate and authorize an OAuth2 token
the client type is web application(what wiki metioned 'installed application' is not found in generated progress).
After 'Enter verification code', something not work as desire, see bellow:
Traceback (most recent call last):
File "/home/moonsea/.cache/oauth/oauth2.py", line 354, in <module>
main(sys.argv)
~~~~^^^^^^^^^^
File "/home/moonsea/.cache/oauth/oauth2.py", line 332, in main
response = AuthorizeTokens(options.client_id, options.client_secret,
authorization_code)
File "/home/moonsea/.cache/oauth/oauth2.py", line 224, in AuthorizeTokens
response = urllib.request.urlopen(request_url, urllib.parse.urlencode(params).encode('utf-8')).read()
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/urllib/request.py", line 189, in urlopen
return opener.open(url, data, timeout)
~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/urllib/request.py", line 495, in open
response = meth(req, response)
File "/usr/lib/python3.13/urllib/request.py", line 604, in http_response
response = self.parent.error(
'http', request, response, code, msg, hdrs)
File "/usr/lib/python3.13/urllib/request.py", line 533, in error
return self._call_chain(*args)
~~~~~~~~~~~~~~~~^^^^^^^
File "/usr/lib/python3.13/urllib/request.py", line 466, in _call_chain
result = func(*args)
File "/usr/lib/python3.13/urllib/request.py", line 613, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 401: Unauthorized
Metadata
Metadata
Assignees
Labels
No labels