How fast does this error occur? Is it after the same amount of polling every time? Are you doing something in particular before the error happens?
Why don't you poll every 5 sec as mentionned in the documentation? (I really don't think it would work with 5 sec, but you would have more reactivity)
Just so you know this forum is quite sleepy, so don't expect too much from it.
Thanks again for the reply. I actually changed the polling to every 5 sec after creating this thread but still the same.
Its actually rather random, sometimes it only takes 7 min before it starts, When the account has no messages coming in or out, I start receiving the session expired error every time I do polling, the odd thing is as soon as i receive a message, everything starts to work again, then same cycle after a few min.
All the tasks that I do for now is do a keep alive on session management every 3min and a refresh access token every 55min.
Currently testing how stable a constantly logged in account is.