title: HttpClient and setting Authorization headers
body: <p>I'm trying to make a simple request to the <a href="https://github.com/basecamp/bcx-api/#making-a-request">Basecamp API</a>, I'm following the instructions provided adding in a sample user agent and my credentials yet I keep getting a <code>403 Forbidden</code> response back. </p>
  
  <p>My credentials are definitely correct so is it a case of my request/credentials being set incorrectly?</p>
  
  <p>This is what I have (removed personal info):</p>
  
  <pre><code>var httpClient = new HttpClient();
  var content = new FormUrlEncodedContent(new[] { new KeyValuePair&lt;string, string&gt;("User-Agent", "MyApp [EMAIL ADDRESS]") });
  
  httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic",
              Convert.ToBase64String(ASCIIEncoding.ASCII.GetBytes(string.Format("{0}:{1}", "[USERNAME]", "[PASSWORD]"))));
  
  var response = await httpClient.PostAsync("https://basecamp.com/[USER ID]/api/v1/projects.json", content);
  var responseContent = response.Content;
  
  using (var reader = new StreamReader(await responseContent.ReadAsStreamAsync()))
  {
       Console.WriteLine(await reader.ReadToEndAsync());
  }
  </code></pre>