 <p>After some intense googling I got my code working. </p> <p>First thing I did was added an extra class to store the token.</p> <pre><code>class TokenResponseModel { [JsonProperty("access_token")] public string AccessToken { get; set; } [JsonProperty("token_type")] public string TokenType { get; set; } [JsonProperty("expires_in")] public int ExpiresIn { get; set; } [JsonProperty("userName")] public string Username { get; set; } [JsonProperty(".issued")] public string IssuedAt { get; set; } [JsonProperty(".expires")] public string ExpiresAt { get; set; } } </code></pre> <p>After that I changed my code to the following code.</p> <pre><code>static internal async Task&lt;TokenResponseModel&gt; GetBearerToken(string siteUrl, string Username, string Password) { HttpClient client = new HttpClient(); client.BaseAddress = new Uri(siteUrl); client.DefaultRequestHeaders.Accept.Clear(); HttpContent requestContent = new StringContent("grant_type=password&amp;username=" + Username + "&amp;password=" + Password, Encoding.UTF8, "application/x-www-form-urlencoded"); HttpResponseMessage responseMessage = await client.PostAsync("Token", requestContent); if (responseMessage.IsSuccessStatusCode) { string jsonMessage; using (Stream responseStream = await responseMessage.Content.ReadAsStreamAsync()) { jsonMessage = new StreamReader(responseStream).ReadToEnd(); } TokenResponseModel tokenResponse = (TokenResponseModel)JsonConvert.DeserializeObject(jsonMessage, typeof(TokenResponseModel)); return tokenResponse; } else { return null; } } </code></pre> <p>I can now get the bearer token from a WebAPI 2 site in my client so I can add it to future request. I hope it is helpful to someone else.</p>