From c8c7def2cf7108f17b91963d32e14e07e5faf523 Mon Sep 17 00:00:00 2001 From: Lev Neiman Date: Mon, 25 Nov 2024 13:21:50 -0800 Subject: [PATCH] Return token content when refreshing token --- dropbox/dropbox_client.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dropbox/dropbox_client.py b/dropbox/dropbox_client.py index 3ddf8243..9776f746 100644 --- a/dropbox/dropbox_client.py +++ b/dropbox/dropbox_client.py @@ -377,7 +377,7 @@ def refresh_access_token(self, host=API_HOST, scope=None): :param host: host to hit token endpoint with :param scope: list of permission scopes for access token - :return: + :return: token content """ if scope is not None and (len(scope) == 0 or not isinstance(scope, list)): raise BadInputException("Scope list must be of type list") @@ -409,6 +409,7 @@ def refresh_access_token(self, host=API_HOST, scope=None): self._oauth2_access_token = token_content["access_token"] self._oauth2_access_token_expiration = datetime.utcnow() + \ timedelta(seconds=int(token_content["expires_in"])) + return token_content def request_json_object(self, host,