Refresh Token - 401 - Error

alexshani
Tera Contributor

Hi everyone, I'm trying to use the refresh token and I get a 401 error. { ' access_denied' }

I'm sending a POST request with 

"Content-type": "application/x-www-form-urlencoded"

and

{ grant_type: 'refresh_token' , client_id, client_secret, refresh_token }

The error is not so informative and I don't know what I'm doing wrong

 

please help

6 REPLIES 6

Tony Chatfield1
Kilo Patron

Hi, testing with Postman and a PDI; I am able to successfully refresh a token using the Content type and parameters you have listed. Are you 'Post'ing to /oauth_token.do

 

TonyChatfield1_0-1721076777378.png

 

Thanks for the response, every third request if failing and I get access_denied. I'm sending a post request to /oauth_token.do with the same parameters you do and the refresh process if failing. what can be the reason? sometimes it work and sometimes it doesn't? same method 

Have you checked the state of your token in Oauth credentials table?
Do you have any custom code that could be invalidating the token?

I don't have a code that revokes the token and I don't have access to our customers credentials table so unfortunately it's not an option for me. I can't understand how suddenly a refresh token isn't working anymore