Does closing an old session cost credits?

Hi, we have a single page app that hosts our shape diver viewer api products and we’ve noticed an issue where when you navigate between model pages, even though we’re creating a new session on navigation, the old model will still show up.

If we save the old session id in a cookie, we can call createSession with that id and then call close on it, then we create a new session with our model url/ticket and it works fine.

We’re just curious if this second call to createSession with the old ID to close it will cause a credit charge?

Hello @Barry_O_Driscoll,

here is an example on how we solved this issue in AppBuilder (which is built with react). Please note that the close function of the session is asynchronous, so this may be your issue at the moment.

Yes, an additional call of createSession will cause an additional credit charge, as we connect again to our servers within this call.

Cheers, Michael