Hi @rueben.tiow
Thank you for your help. I had to delete all my API and database connections and rebuild it again. After that everything seems to work.
const refreshBody = {
client_id: "client_id",
client_secret: "secret",
grant_type: "refresh_token",
realm: "custom_db",
audience: "API Audience",
scope: "offline_access",
refresh_token: "refresh_token"
}
const { data: refreshData } = await axios.post("URL", refreshBody,
{
headers: { 'Content-Type': 'application/x-www-form-urlencoded', }
})
The above code works and i am able to get a new access token.