AnsweredAssumed Answered

Getting "invalid_grant" while navigation on SugarCRM

Question asked by Nuno Centeio on Aug 19, 2016
Latest reply on Aug 22, 2016 by Tevfik Tümer



I browse SugarCRM inside several iFrames in my Web Application. The SessionID is always the same.


When I log in SugarCRM I can see a "/rest/v10/oauth2/token" with my credentials and I get the following reply:



After some minutes, while navigating, I'm redirected to the login page. When that happens I see the following request to "/rest/v10/oauth2/token":



But I get the response:

{"error":"invalid_grant","error_message":"Invalid refresh token"}


Inside SugarCRM I have some custom code that invokes WebServices on my side. That WebServices requests tokens to SugarCRM with a different user that is navigating BUT in some cases I invoke "/rest/v10/oauth2/sudo/ with the user that is navigating.


Anyone have an idea of why the "Invalid refresh token"?


Thanks in advance.