mikf / gallery-dl

Command-line program to download image galleries and collections from several image hosting sites
GNU General Public License v2.0
11.7k stars 953 forks source link

Trouble Replacing DeviantArt OAuth Token #6261

Closed BlueSpiders99 closed 3 weeks ago

BlueSpiders99 commented 3 weeks ago

When I try to run gallery-dl on a DeviantArt address, as follows:

PS C:\art-storage> .\gallery-dl.exe -c .\config.json https://www.deviantart.com/REDACTED/favourites/96088431/new

I get this error:

[deviantart][info] Refreshing private access token
[deviantart][error] AuthenticationError: "The refresh_token is invalid." (invalid_request)

I attempt to refresh my token using the following:

PS C:\art-storage> .\gallery-dl.exe --clear-cache deviantart
[cache][info] Deleted 1 entry from 'C:\Users\REDACTED\AppData\Roaming\gallery-dl\cache.sqlite3'

PS C:\art-storage> .\gallery-dl.exe oauth:deviantart
[oauth][info] Opening URL in :

scope=browse+user.manage

[oauth][info] Writing 'refresh-token' to cache
Your 'refresh-token' is

REDACTED

This value has been cached and will automatically be used.

But this does not solve the issue. How can I fix this?

BlueSpiders99 commented 3 weeks ago

I have solved the problem. I needed to specify my config file when running the oauth command, as follows:

PS C:\art-storage> .\gallery-dl.exe oauth:deviantart -c .\config.json