title: c # desktop app error 401 How can I send the data
body: <p>I do not have a problem getting tokens in the desktop application I developed. But when I try to send data, I get a 401 error.</p>
  <pre><code>HttpWebRequest webRequest;
  string requestParams = &quot;&quot;;
  webRequest = (HttpWebRequest)WebRequest.Create(&quot;url&quot;);
  webRequest.Credentials = CredentialCache.DefaultCredentials;
  webRequest.Method = &quot;POST&quot;;
  webRequest.ContentType = &quot;application/json&quot;;
  webRequest.Headers.Add(&quot;x-api-key&quot;, &quot;112233&quot;);
  webRequest.Headers.Add(&quot;AccessToken&quot;, token);
  byte[] byteArray = Encoding.UTF8.GetBytes(req);
  webRequest.ContentLength = byteArray.Length;
  using (Stream requestStream = webRequest.GetRequestStream())
  {
       requestStream.Write(byteArray, 0, byteArray.Length);
  }
  using (WebResponse response = webRequest.GetResponse()) 
  {
      using (Stream responseStream = response.GetResponseStream())
          {
               StreamReader rdr = new StreamReader(responseStream, Encoding.UTF8);
               string Json = rdr.ReadToEnd();         
          }
  }
  </code></pre>