def generate_oauth_token(self):
        """This method used to generate the oauth zoom token

        Returns:
            _type_: the zoom oauth token
        """
        error=False
        for _ in range(self.retry):
            try:
                base64String = base64.b64encode(
                    f"{self.client_id}:{self.client_secret}".encode('utf-8')).decode("ascii")
                headersfortokens = {
                    'Accept': 'application/json',
                    'authorization': "Basic " + base64String,
                }
                query_params = {
                    "grant_type": "account_credentials",
                    "account_id": self.account_id,
                }
                oauth_token = requests.post(url=self.token_url,
                                            params=query_params,
                                            headers=headersfortokens)
                if (oauth_token.status_code in self.error_statuses) or (error==True):
                    error=False
                    continue ## To Do: Need to add delay 
                if oauth_token.status_code == 200:
                    jsonData = json.loads(oauth_token.text)
                    auth_token = jsonData['access_token']
                    return auth_token
                elif oauth_token.status_code == 400:
                    logging.error("The requested report cannot be generated for this account because"
                                  " this account has not subscribed to toll-free audio conference plan."
                                  " Error code: {}".format(oauth_token.status_code))
                elif oauth_token.status_code == 401:
                    logging.error("Invalid access token. Error code: {}".format(
                        oauth_token.status_code))
                elif oauth_token.status_code == 300:
                    logging.error("Only provide report in recent 6 months. Error code: {}".format(
                        oauth_token.status_code))

            except Exception  as err:
                error=True
                logging.error("Something wrong. Exception error text: {}".format(err))
This method used to generate the oauth zoom token

        Returns:
            _type_: the zoom oauth token
        
Solutions/ZoomReports/Data Connectors/ZoomSentinelConnector/__init__.py