Unable to validate the webhook URL in Python

I’m using Zoom JWT application and I’m trying to subscribe to events while subscribing events I’m passing web hook as a parameter in the features. Event subscription web hook is returning as Invalid URL. My web hook API is written in python 3. If anyone can share the python code snippet to validate the web hook API it could be appropriated.

URL Validation failed. Try again later

Code Snippet
webhook_token = os.environ.get(‘ZOOM_WEBHOOK_SECRET_TOKEN’)
token = webhook_token.encode(“utf-8”)
plainToken = request.json.get(“payload”).get(“plainToken”).encode(“utf-8”)
hashForValidate = hmac.new(token,plainToken,hashlib.sha256()).hexdigest()
return ({
“plainToken”: plainToken,
“encryptedToken”: hashForValidate

Try passing hashlib.sha256 into the hmac.new function instead of hashlib.sha256().

        plainToken = request.json.get("payload").get("plainToken").encode("utf-8")
        hashForValidate = hmac.new(token,plainToken,hashlib.sha256).hexdigest()
       return ({
            "plainToken": plainToken,
            "encryptedToken": hashForValidate

Above code snippet also not working