I am using following link as guide for me to authorize the api I am configuring in my Zendesk webhook:
and I am writing a code equivalent to the this function in python isValidSignature(signature, body, timestamp) but I am not able to get an hmac signature that is matching signature submitted to me in my headers :
def isValidSignature(signature, body, timestamp):
key = webHookSecret.encode('utf-8')
hmac_result = hmac.new(key, (timestamp+body).encode('utf-8'), hashlib.sha256)
hmac_result = hmac_result.digest()
if signature == str(base64.b64encode(hmac_result), 'utf-8'):
Please advise what should I modify to fix this issue?
댓글을 남기려면 로그인하세요.