def get_access_token(self):
        """get_access_token method will fetch the access token using api and set it in header for further use."""
        __method_name = inspect.currentframe().f_code.co_name
        try:
            body = {"secret_key": self._secret_key}
            logging.info(consts.LOG_FORMAT.format(__method_name, "Getting access token."))
            response = self.make_rest_call(method="POST", url=consts.URL + consts.ACCESS_TOKEN_SUFFIX, data=body)
            access_token = response.get("data", {}).get("access_token")
            self.header.update({"Authorization": access_token})
            self.keyvault_obj.set_keyvault_secret(self.access_token_key, access_token)
            logging.info(consts.LOG_FORMAT.format(__method_name, "Generated access token Successfully."))
        except KeyError as err:
            logging.error(consts.LOG_FORMAT.format(__method_name, "Key error : {}.".format(err)))
            raise ArmisException()
        except ArmisException:
            raise ArmisException()
        except Exception as err:
            logging.error(
                consts.LOG_FORMAT.format(__method_name, "Error while generating the access token : {}.".format(err))
            )
            raise ArmisException()
get_access_token method will fetch the access token using api and set it in header for further use.
Solutions/Armis/Data Connectors/ArmisAlertsActivities/ArmisAlertActivitySentinelConnector/utils.py