Hi, so I am using Node.js and I realized that I need to refresh the access_token since it expires every so often. I got a refresh token and am trying to get an access token and set it as a variable in the class but I keep on getting a 400 error code with the message "The request parameters do not match any of the supported authorization flows. Please refer to the API documentation for the correct parameters." Below is my code.
axios
.post(
`https://api.dropbox.com/oauth2/token`,
{
grant_type: "refresh_token",
refresh_token: this.refresh_token,
},
{
headers: {
Authorization: `Basic ${this.client_id}:${this.client_secret}`,
"Content-Type": "application/x-www-form-urlencoded",
},
}
)