Nandaka / DanbooruDownloader

*booru image downloader
http://nandaka.devnull.zone/
390 stars 38 forks source link

Authentication Faliure #209

Open Nero808 opened 4 years ago

Nero808 commented 4 years ago

Been getting AuthenticationFaliure errors for the past few hours but I found out why. Danbooru changed it so you now need an API Key to login and authenticate. Hope you will be updating the downloader for their update. The ReadMe instructs how to do cookies for other sites but not for Danbooru, so I do not know how to set it.

Said API Change: Removed the ability to authenticate using the login and password_hash params. If you were using this method you should generate an API key and use login and api_key instead.

PieKnu commented 4 years ago

I can confirm that problem and the given solution.

### AND I even have a workaround for the lazy ppl ;P

As a programmer we say "programmers are lazy". So my first guess was that it even without an update should be possible to log in again.

If we take a look at the file "/Entity/DanbooruProvider.cs"

string authString = "login=" + this.UserName + "&password_hash=" + hash;
                        queryStr = queryStr + "&" + authString;

We will see why ;)

We now have 3 Solutions:

Screenshot_9

*The API KEY can be created under https://danbooru.donmai.us/profile" and under the TAB "API Key - View"