def _refresh_access_token()

in src/wagtail_localize_smartling/api/client.py [0:0]


    def _refresh_access_token(self):
        data = cast(
            types.RefreshAccessTokenResponseData,
            self._request(
                method="POST",
                path="/auth-api/v2/authenticate/refresh",
                response_serializer_class=RefreshAccessTokenResponseSerializer,
                send_headers=False,
                json={"refreshToken": self.refresh_token},
            ),
        )
        self._update_tokens(
            access_token=data["accessToken"],
            refresh_token=data["refreshToken"],
            access_token_expires_in=data["expiresIn"],
            refresh_token_expires_in=data["refreshExpiresIn"],
            token_type=data["tokenType"],
        )