Zendesk Initialization and the Logout User call in Zendesk iOS SDK | Community
Skip to main content

Zendesk Initialization and the Logout User call in Zendesk iOS SDK

  • December 22, 2023
  • 1 reply
  • 0 views

Hello, I'm wondering, is it possible when Zendesk gets initialized that the logout user call will fail? Our app is reliant on clearing previous chat history, and am wondering how we would handle a case where logout does not work.

1 reply

Greg29
  • December 28, 2023

Hi Spencer! Any API call could fail (500-level errors, network issues, etc.), so I would definitely say it's possible and should be accounted for. As a matter of fact, we handle this case in our docs, although we don't give any specific directive on what to do in a failure. It's obviously going to be either a) fairly rare, since the call should complete whether or not there is a user logged-in, or b) likely part of a larger issue with our SDK in general (500's). 

Since there isn't any reason to handle either of those scenarios differently a basic solution might be an exponential retry backoff. I found a Medium post on this topic for iOS and Android, so hopefully that will give you some direction!