upbit / pixivpy

Pixiv API for Python
https://pypi.org/project/PixivPy3/#files
The Unlicense
1.79k stars 149 forks source link

auth() failed! check refresh_token. #12

Closed ninwasou closed 6 years ago

ninwasou commented 8 years ago

Hi, I've got error when trying the example:

Traceback (most recent call last): File "test_pixivpy.py", line 21, in api.auth() File "/usr/local/lib/python2.7/dist-packages/pixivpy3/api.py", line 88, in auth raise PixivError('[ERROR] auth() failed! check refresh_token.\nHTTP %s: %s' % (r.status_code, r.text), header=r.headers, body=r.text) pixivpy3.utils.PixivError: [ERROR] auth() failed! check refresh_token. HTTP 400: {"has_error":true,"errors":{"system":{"message":"Invalid refresh token","code":1508}}}

What is the problem?

upbit commented 8 years ago

En, may be Pixiv change the refresh_token auth method, so re-login with refresh_token is failed.

I will check the new client refresh_token auth, currently you can use password auth instead of get access_token by refresh_token. For demo.py, just commented out this line

grawity commented 6 years ago

According to https://github.com/alphasp/pixiv-api-client/commit/8fa9c7199016f95988e60ad45490b20bfe9bb3c9, refresh_token can be used with a different client ID.

kaecy commented 6 years ago

grawity is right. it works with those client_id and client_secrets.

Hitechcomputergeek commented 6 years ago

You should be able to close this now that https://github.com/upbit/pixivpy/pull/50 has been merged.