psn-api icon indicating copy to clipboard operation
psn-api copied to clipboard

Error generating auth object

Open cleverkraft opened this issue 5 years ago • 2 comments

Tried to create an auth objected, as per the documentation, received an error.

Python 3.5.3 (default, Jan 19 2017, 14:11:04) 
[GCC 6.3.0 20170124] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from psnapi.Auth import Auth
>>> auth = Auth('realemail@redacted', 'validpassword', 'ticket_id_as_per_documentation', '2FAcode')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/pi/Scripts/psnbot/psn-api-master/psnapi/Auth.py", line 68, in __init__
    if (self.GrabNPSSO() is False or self.GrabCode() is False or self.GrabOAuth() is False):
  File "/home/pi/Scripts/psnbot/psn-api-master/psnapi/Auth.py", line 76, in GrabNPSSO
    response = urllib.request.urlopen(request)
  File "/usr/lib/python3.5/urllib/request.py", line 163, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.5/urllib/request.py", line 472, in open
    response = meth(req, response)
  File "/usr/lib/python3.5/urllib/request.py", line 582, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python3.5/urllib/request.py", line 510, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.5/urllib/request.py", line 444, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.5/urllib/request.py", line 590, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 400: Bad Request

cleverkraft avatar Jul 24 '18 15:07 cleverkraft

try reloading the page and take the second "ticket-uuid" key

therealX01D avatar Jul 30 '18 16:07 therealX01D

refreshing page does not provide new "ticket-uuid" key

Porterhouse21 avatar Jul 10 '19 19:07 Porterhouse21