title: Linkedin Api The remote server returned an error: (401) Unauthorized
body: <p>I am working on the Linkedin Api. 
  In my OAuthLinkedin.cs, 
  I have the following: </p>
  
  <pre><code>        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
  </code></pre>
  
  <p>;
          }
  My code is able to get a oauthToken, oauthTokenSecret</p>
  
  <p>WebResponseGet(HttpWebRequest webRequest) is where it fails.
  Status:  System.Net.WebExceptionStatus.Protocol error    The remote server returned an error: (401) Unauthorized.</p>
  
  <p>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</p>
  
  <p>Thanks
  Sun</p>