access token expire immediately or valid for one time

I am trying to fetch data from Sugar through API so after getting OAtuth token from sugar when I call an API e.g Accounts this works fine but after that, if I call another API with the same token it gives the error "invalid_grant" with a message "Your authentication token is invalid."

Parents Reply Children
  • yes, the account is dedicated. Using SugarCRM Version 10.0.2 (Build 182 E) (Q2 2020) calling from Node 13.12.0 through Axios.

    Sugar is deployed on AWS it works fine when I make a call from my local Node server but when I deploy my node server to AWS as well then the INVALID_GRANT issue occurs

    So the workaround I went with I generate a new token before every API call. It works this way but not a good solution