You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The extent to which the client currently manages the session is:
assign the access_token from a successful login request
reuse it for all subsequent requests
To handle your scenario where session timeout is a factor and a fresh session id is needed, we would need to support the refresh token flow. I'd be open to it
I had "INVALID_SESSION_ID: Session expired or invalid" errors before, and found out the root cause was having concurrent sessions and one of them calling logout() while the other sessions were still in use, and this invalidated them. Also, if you're using Client as a context manager, logout() will be called when the context exists.
Never had a single INVALID_SESSION_ID again after I stopped calling logout() or using Client as a context manager.
Given this, I'd say that logout() is evil and should never be called. Automatically refreshing the token would be hiding the issue, so I'm not if favor of adding that feature.
When using this to bulk send data (one item at a time) I am hit with
Exception: [{'message': 'Session expired or invalid', 'errorCode': 'INVALID_SESSION_ID'}]
regularly.
For each request I do
with SalesforceClient as client
so there is no way it will actually expire, unless it does within a second?The text was updated successfully, but these errors were encountered: