Session Data being null on server restart

Shopify Partner
4 0 1
Hi Everyone,
I have theme app extension that will make some admin api calls. For that, I have deployed the server in heroku. But whenever heroku restarts the server, without launching the admin app I am unable to get the session data which is necessary to process the Rest admin API calls. Is there a way to update the session on every server restart automatically?
I know it tries to do the root api call on every restart. but, the session was null at that time so, we are not able to process the request completely. I have a middleware where I can able to get the session data. Is there a way to create a session and update it on demand so that the APIs will work without relaunch of the application from the admin portal.
Thank You
Reply 1 (1)

Shopify Partner
34 1 5

hey did you solve ?