Hello,
I followed the approach described in below post to get refresh token
https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Get-refresh-token-from-access-token/td-p/596739
Through Javascript I am trying to get new short lived access token (step 7 in above post) using below code, but I am getting error as given below
-->"error": "invalid_request", "error_description": "The request parameters do not match any of the supported authorization flows. Please refer to the API documentation for the correct parameters."
If I tried the same through Postman I am able to get the access token.
My javascript code is given below
--------------------------------------------------------
let tokobj = {
"refresh_token" : <My refresh token obtained using above approach>,
"grant_type" : "refresh_token",
"client_id" : <my app key>,
"client_secret" : <my app secret>
}
let tokenOptions = {
method: "POST",
headers: {
"Content-Type" : "application/json"
},
body: JSON.stringify(tokobj)
}
const tokenResults = await fetch(reftokendpoint, tokenOptions);
const tokenPost = await tokenResults.text();
console.log('Exec status', tokenPost)
------------------------------------------------------------------------------------
Please suggest how this can be resolved
Thanks