Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pixiv refresh token from the "callback" page doesn't work #1522

Closed
arisboch opened this issue May 2, 2021 · 5 comments
Closed

Pixiv refresh token from the "callback" page doesn't work #1522

arisboch opened this issue May 2, 2021 · 5 comments

Comments

@arisboch
Copy link

arisboch commented May 2, 2021

I'm following all instructions I see when I use enter gallery-dl oauth:pixiv, but the only thing I get in return is {'has_error': True, 'errors': {'system': {'message': 'The authorization code has expired', 'code': 1508}}, 'error': 'invalid_grant'}. What can I do?

@mikf
Copy link
Owner

mikf commented May 2, 2021

Be faster. No, seriously, that's it.
The code expires after only a few seconds,
so you have to be rather quick to select-copy-paste-enter

@arisboch
Copy link
Author

arisboch commented May 2, 2021

Is there any way to download sign-in-only content from Pixiv without having to jump through this kinda absurd hoops (such as cookies)?

@mikf
Copy link
Owner

mikf commented May 2, 2021

No, there isn't, at least not with gallery-dl.
This is the only way to use the Pixiv Mobile API after logging in with username and password got disabled (#1304, upbit/pixivpy#158)

Thankfully this only has to be done once, and I'd recommend also storing the token in your config file in case your cache gets deleted ("refresh-token": "token" where previously your username and password setting where).

@marlekal
Copy link

marlekal commented May 3, 2021

is there a way to view the token in order to store it in the config file? i already have the token linked using the "callback" steps thingy
or do i have to do the process again?

@mikf
Copy link
Owner

mikf commented May 4, 2021

Not with gallery-dl. You could try sqlitebrowser, or you put a print(token) in extractor/pixiv.py before line 546. or I could write a small Python script that does it, but doing the process again might be the fastest.

You'll also be able to select which cache entries to delete, by the way: 755164b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants