Invalid_grant while using refresh_token

Hello, I’ve been stuck on this problem and can’t seem to figure it out. My application successfully gets a grant, access and refresh token when integrating to a users account. The problem comes when the access_token expires and I try t refresh it using the refresh token; I always end up with a json response {‘error’:‘invalid_grant’}. When trying to refresh the access_token I pass the client_id, client_secret, refresh_token and redirect_url as part of the request params. Am I missig anything?

Just to add I also pass ‘grant_type’ : ‘refresh_token’

As per the as per the aouth2 RFC that seems all that’s required
Any help would be appreciated.