Question

I am trying to access the delicious API and decided to start using the RestSharp library for the calls. My test code looks like this:

var client = new RestClient("https://api.del.icio.us/");
client.Authenticator = new HttpBasicAuthenticator("username", "password");            
client.UserAgent = "my_user_agent";            
var request = new RestRequest("v1/tags/get");

client.ExecuteAsync(request, response =>
{
   if (response.ResponseStatus == ResponseStatus.Error)
   {
      Dispatcher.BeginInvoke(() =>
      {
          MessageBox.Show(response.ErrorMessage);
      });
   }
   else if (response.ResponseStatus == ResponseStatus.Completed)
   {                    
      Dispatcher.BeginInvoke(() =>
      {
          MessageBox.Show(response.Content);
      });
   }
});

For this code the delicious API returns "access denied" code although my username and password used in the code are correct. I suspect that I may be doing something wrong with RestSharp as I just started using this library. Can anyone help me with the code above? What am I doing wrong?

No correct solution

OTHER TIPS

You might have to use

client.Credentials = new NetworkCredential("username", "password");

See standard curl like access from dotnet

as to why on earth you would not allow access like any other system in the world.. dont ask me..

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top