title: FitBit OAuth 2.0 Access_token resulting missing grant_type parameter value
body: <p>I Successfully Implemented the authorization step and i got the code value with redirect_uri. and while Implementing FitBit OAuth AccessToken Request (<a href="https://wiki.fitbit.com/display/API/OAuth+2.0" rel="nofollow">https://wiki.fitbit.com/display/API/OAuth+2.0</a>)
  i am getting the following error:</p>
  
  <pre><code>WARN : org.apache.http.impl.client.DefaultHttpClient - Authentication error: Unable to respond to any of these challenges: {oauth=WWW-Authenticate: OAuth realm="https%3A%2F%2Fapi008-g4.prod.dal05.fitbit.com"}
  {"errors":[{"errorType":"oauth","fieldName":"n/a","message":"invalid_request, Missing grant_type parameter value"}],"success":false}
  </code></pre>
  
  <p>as per document i supplied every recommended values and the code is like:</p>
  
  <pre><code>String authString = fitbit.getClient_id()+":"+fitbit.getClient_secret();
  String authEncString = Base64.getEncoder().encodeToString(authString.getBytes());
  url = fitbit.getAccesstoken_uri() + "?code="+code+"&amp;grand_type="+fitbit.getGrant_type()+"&amp;client_id="+fitbit.getClient_id()+
          "&amp;redirect_uri="+fitbit.getRedirect_url();
  String url3 = fitbit.getAccesstoken_uri();
  
  HttpClient httpClient = new DefaultHttpClient();
  HttpGet request = new HttpGet(url3);
  request.addHeader("Authorization", "Basic " + authEncString);
  request.addHeader("Content-Type","application/x-www-form-urlencoded");
  request.addHeader("code", code);
  request.addHeader("grant_type",fitbit.getGrant_type());
  request.addHeader("client_id", fitbit.getClient_id());
  request.addHeader("redirect_uri", fitbit.getRedirect_url());
  
      HttpResponse response = httpClient.execute(request);
  
      String json = EntityUtils.toString(response.getEntity(), "UTF-8");
  </code></pre>
  
  <p>Here grant_type value is authorization_code 
  Accesstoken_uri : <a href="https://api.fitbit.com/oauth2/token" rel="nofollow">https://api.fitbit.com/oauth2/token</a>   </p>
  
  <p>Can any one solve this?</p>