Rest API - Webhooks and Events
Identify the mistake in this Python webhook signature verification code:
import hmac
import hashlib
secret = b'secretkey'
payload = b'webhook payload'
header_signature = 'abcdef123456'
computed_signature = hmac.new(secret, payload, hashlib.sha256).hexdigest
if hmac.compare_digest(computed_signature, header_signature):
print('Signature valid')
else:
print('Signature invalid')