This project is read-only.

401 error when using Search(SearchQuery search)

Oct 23, 2014 at 4:29 AM

When I attempt the following
public ActionResult ProductSearchDiscogs(Admin_DiscogsSearch discogSearch)
// get authorization, this works fine when I add in my credentials
var auth = new DiscogsAuth(...);
var authHeaders = auth.RegenerateHeaders("...");
var userInfo = new UserAPI("...);

var discogs = new Discogs3("MyApp/1.0.3 +");

var result = discogs.GetRelease(12345); // this works fine

var query = new SearchQuery()
ReleaseTitle = discogSearch.SearchQuery, // get the searchterm
Type = SearchItemType.Release // set the search type
var results = discogs.Search(query); // this give me a 401
I am getting a 401 error when using the Search method, but any of the other methods such as GetRelease works great.

Please let me know if you have any thoughts on why just the Search is failing with the 401.

Oct 23, 2014 at 7:13 AM

I currently don't have time to support this library, but I think I recently read that Discogs is removing unauthenticated search requests from the API. You may need to update the search part of the library to work with the new API. I presume you can learn the specifics of the change on the Discogs API forums/page. It would be great if you can then submit a patch to keep this library up to date.
Oct 23, 2014 at 2:17 PM
Oh man Im sorry to hear that -- this is a great tool. ill see if there is anything I can do about a patch

Oct 24, 2014 at 9:08 PM
I've had the same problem with search/GetImage and uploaded a fix for this a few days ago. Check the 'patches' under 'source code'

Hope that this will work for you as well.
Jan 4, 2015 at 6:08 PM
Reading the discogs forums, it appears that there is a fundamental issue with their latest changes and the way that the authentication works between the client and the server - they are recommending that this should now use HTTPS and PLAINTEXT - if correct then this may explain why there are so many 401 errors being returned on near identical searches. If someone can add a PLAINTEXT option to the library at least it can be checked out - thanks