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?