From cafa077da674991bf8ffb7a70289deebbb7e666c Mon Sep 17 00:00:00 2001 From: Hardik Chavda Date: Thu, 20 Jun 2024 11:02:36 +0530 Subject: [PATCH] refresh token error solved --- smtp_connector.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/smtp_connector.py b/smtp_connector.py index 4bc3af5..6d1d60e 100644 --- a/smtp_connector.py +++ b/smtp_connector.py @@ -463,8 +463,10 @@ def _interactive_auth_refresh(self): except Exception: return phantom.APP_ERROR, "Error retrieving OAuth Token" + self._access_token = oauth_token.get('access_token') - self._refresh_token = oauth_token.get('refresh_token') + if response_json.get("refresh_token"): + self._refresh_token = oauth_token.get('refresh_token') self._state['oauth_token'] = oauth_token return phantom.APP_SUCCESS, ""