JSONObject json = new JSONObject();
json.put("clientId", CLIENT_ID);
json.put("grant_type", "authorization_code");
json.put("redirect_uri", REDIRECT_URI);
json.put("code", "auth code");
json.put("code_verifier", "verifier code");
Error on highlighted line, i am getting below error.
{"success":false,"errors":[{"errorType":"invalid_request","message":"Missing 'grant_type' parameter value. Visit https://dev.fitbit.com/docs/oauth2 for more information on the Fitbit Web API authorization process."}]}
Best AnswerCan someone help on this?
Best Answer
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
What programming language are you using? These body parameters should be a single string separated by the & symbol, for example
grant_type=authorization_code&code=<authorization_code>&redirect_uri=https%3A%2F%2Fexample.com%2Fcallback&code_verifier=<code_verifier_value>
Can you confirm this is being performed by your code?
Best Answer