You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 16, 2021. It is now read-only.
Hi, I am currently using the following to verify the X_Signature on the requests sent to our webhooks endpoint, however it is failing. I feel the documentation is not super clear on it, for instance does 'complete event payload' mean the payload part of the json object, or does it mean the full body of the request? Below is the code I am attempting to use at the moment however it is failing. If you could provide some example code or point out what I am doing wrong that would be great.
import hashlib
import hmac
import base64
# secret token as shown on the webhooks section of the dashboard
key = bytes(ck, 'utf-8')
# body = bytes(json.dumps(json.loads(body.decode())['payload']), 'utf-8')
message = body # request.body
digester = hmac.new(key=key, msg=message, digestmod=hashlib.sha3_224)
signature = digester.digest()
signature = base64.b64encode(signature).decode()
return signature