Discogs - use of API

May 5, 2012 at 9:09 AM
Edited May 6, 2012 at 12:32 PM


I try to use the API and I created a very simple Windows app in Visual Studio 2010, with a form and button. Clicking on the button, I call the function:

private void button1_Click(object sender, EventArgs e)        {   

  Discogs discogs = new Discogs("my_api_key");      // instance of class Discogs     

 Release release = discogs.GetRelease(12345); // Pass the ID of the desired release     


When I run the app, I get the following error:

Le serveur a commis une violation de protocole. Section=ResponseStatusLine .

It is a WebException with: e.Status=ServerProtocolViolation


I found on the forum (http://www.discogs.com/help/forums/topic/224810) the following guidance for getting an API key:

nik (Discogs staff) Hi - you can get your API key at https://www.discogs.com/users/api_key

Please, can you tell how can I get a value for  "my_api_key" ?


But the page https://www.discogs.com/users/api_key, can't be found.

How can I get an API key, for running my app ?


If you have a simple app which use this API, would be great for me.

Thanks in advance.


Now, I have run the project DiscogsNet.ReleaseViewerExample.csproj from original DiscogsNet source code (http://discogsnet.codeplex.com/SourceControl/list/changesets), and I have got the same error, when I call the function GetRelease. The value for the API key which I found in code is: private const string ApiKey = "acb9cdfa0b";

Is there a problem with this value ? If I try to make : ApiKey = null; I get another error.

Jul 30, 2012 at 8:57 PM

There is a new API in place with Discogs. The library has been updated to work with it, but the docs haven't been. I'll see to update the docs. You can use the Discogs3 class to access the current API and it doesn't require a key.