After 8 hours from our initial message, we start getting errors when sending a message. It's a token expired, so we correctly refresh the user token, but we still get the error.
I though there was a logic error in the refresh, but the issue is that the session_send_message is authorized by a session token, NOT a user token! We are caching the token in our session object, and never updating it!
We need a way to refresh this.
We might be able to add a custom errback in the libgaldr_send_im_to that handles as 1003 (expired token) and removes the session from our acct->sessions. This would cause us to call session_create_with to get an updated version of the session.
After 8 hours from our initial message, we start getting errors when sending a message. It's a token expired, so we correctly refresh the user token, but we still get the error.
I though there was a logic error in the refresh, but the issue is that the
session_send_message
is authorized by asession
token, NOT a user token! We are caching the token in our session object, and never updating it!We need a way to refresh this.
We might be able to add a custom errback in the
libgaldr_send_im_to
that handles as1003
(expired token) and removes the session from ouracct->sessions
. This would cause us to callsession_create_with
to get an updated version of the session.