title: "Header is missing" error trying to authenticate to an API
body: <p>I am trying to connect to an API in my website and authenticate in it. The API documentation sample is in CURL which I know so little about it. </p>
  
  <p>The CURL command is:</p>
  
  <pre><code>curl -X POST \
     --user ${client_id}:${client_secret} \
  http://dashboard.myAPI.ir/oauth/token? grant_type=password&amp;password=${your_login_password}&amp;username=${your_login_user_name}'
  </code></pre>
  
  <p>and this is my code trying to convert it to C#:</p>
  
  <pre><code>var Username = "myuseranme";
  var Password = "mypassword";
  var SecretId = "mysecretid";
  var ClinetID = "myclientid";
  
  var httpClient = new HttpClient();
  var authToken = Encoding.ASCII.GetBytes($"{ClinetID}:{SecretId}");
  httpClient.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Basic",
                  Convert.ToBase64String(authToken));
  
  var response = await httpClient.GetAsync($"http://dashboard.packpay.ir/oauth/token?grant_type=password&amp;pasword={Password}&amp;username={Username}");
  
  var content = await response.Content.ReadAsStringAsync();
  </code></pre>
  
  <p>After I run the code, the value of <code>content</code> is this:</p>
  
  <blockquote>
    <p>"{\"error\":\"unauthorized\",\"error_description\":\"Header is
    missing\"}"</p>
  </blockquote>
  
  <p>what's wrong?</p>