Always getting unsupported grant type

I am always getting unsupported grant type when calling token endpoint with refresh_token grant type
function() {
axios.post(https://www.patreon.com/api/oauth2/token, {
grant_type: refresh_token,
refresh_token: ${process.env.PATREON_CREATOR_REFRESH},
client_id: ${process.env.PATREON_CLIENT_ID},
client_secret: process.env.PATREON_CLIENT_SECRET,
}).then((response : any) => {
console.log(response)
process.env.PATREON_CREATOR_REFRESH = response.refresh_token
process.env.PATREON_CREATOR = response.access_token
}).catch((error : any) => {
console.error(error)
})
All the enviroment variables are right im testing it on postman and im still getting the same response so i am probably using a wrong endpoint but i dont find any information


Can someone help me with this please?

Not sure if that is your issue, but in the code sample you provided you don’t have ${} around your client secret.

Edit:
Otherwise isn’t the refresh_tokens individually assigned to the members, not the creator?

Try and make sure that the refresh token is not expired already.