def generateToken(self):
        """
        Function to generate the token for ETD message search api
        :return: True if successful, False otherwise
        """
        # Construct token URL
        credentials = CLIENTID + ":" + CLIENTSECRET
        # Create signature
        signature = base64.b64encode(credentials.encode()).decode()
        # Construct Headers
        headers = {
            "Host": "api." + self.region + ".etd.cisco.com",
            "clientId": self.clientId,
            "secret": self.clientSecret,
            "x-api-key": self.apiKey,
            "Authorization": "Basic " + signature
        }
        tokenResponse = retryRequest(url=self.tokenUrl, headers=headers)
        if tokenResponse:
            if tokenResponse.status_code == HTTPStatus.OK:
                self.secretToken = tokenResponse.json().get('accessToken')
                return True
        return False

        Function to generate the token for ETD message search api
        :return: True if successful, False otherwise
        
Solutions/Cisco ETD/Data Connectors/CiscoETDAzureSentinelConnector/__init__.py