We have developed a web portal outside salesforce while using Salesforce as an identity provider. For the time being, we have some VF pages exposed within iFrames. Many of you know how these .. 'temporary' solution evolve.

However .. the portal itself is hosted on another platform which is all working fine .. however, after some time, the SFDC session expires which is causing a login page within the iFrames.

Is there a way to call, for example, a REST API to extend the SFDC session on a regular interval like for example every 30m ?. This then would make sure while inside the portal .. the SFDC session is kept alive.

1 Answer 1


SessionId or accesstoken in SF expire if there is inactivity for few minutes / hours based on your profile settings. You have 2 options

  1. In profile setting for the user, change the default Session Logout to be longer enter image description here

  2. Write a poller in your implementation to automatically call any endpoint. It will call as activity for the given period, it will make sure the session does not expire for you.

  • Thanks, Pranay. I'm aware of the profile session however while the user is exploring the (external) portal .... the session is never extended. Which is my issue. Now I was thinking to create a 'dummy' endpoint .. but I'm not sure this will really extend the session as I understand these are handled differently. Dec 10, 2018 at 15:16
  • 1
    @JosVervoorn You will need to make sure that you make a callout only after the half way through of the session timeout has crossed. E.g., if your session timeout is set to 2 hours, you will need to make the callout at 61st minute, so that your session is extended for another 2 hours. You can refer to more details on this on the documentation
    – Jayant Das
    Dec 10, 2018 at 16:08
  • Thanks Jayant for the information but the question is ... how. I was thinking of creating a 'dumm' rest API but i'm not sure if that would extend the session .. which is basically the main question. Dec 11, 2018 at 7:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .