I am using canvas app and have java code at backend. We are integrating using web server oauth.

I am using my java code to retrieve access token first time now i need to maintain the session , how can i refresh the token ??

If i use the same code which i used for retrieving token first time, i am getting issue and that does not work. So what is the best way to achieve that.


If you're talking about OAuth for Salesforce, in the connected app settings you need to be sure to include the Refresh permission from the picklist of permissions to request (I think off the top of my head it's under 'Full'). If the authentication is with another system there should be something similar.

Once that is sorted you should get a refresh token back upon authentication, as well as the access token. The access token can then be used for the session, and when it expires you can request a new access token by sending the refresh token through.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.