I am working on the Linkedin Api. In my OAuthLinkedin.cs, I have the following:
public string WebResponseGet(HttpWebRequest webRequest)
{
StreamReader responseReader = null;
string responseData = "";
try
{
responseReader = new StreamReader(webRequest.GetResponse().GetResponseStream());
responseData = responseReader.ReadToEnd();
}
catch
{
throw;
}
finally
{
webRequest.GetResponse().GetResponseStream().Close();
responseReader.Close();
responseReader = null;
}
return responseData
; } My code is able to get a oauthToken, oauthTokenSecret
WebResponseGet(HttpWebRequest webRequest) is where it fails. Status: System.Net.WebExceptionStatus.Protocol error The remote server returned an error: (401) Unauthorized.
It is able to get a token secret after requesting permission to access linkedin. but I am not sure abt this unauthorized error. is it some permission issue. where do I check this
Thanks Sun