From c217e9f50a841624adfe4122ea73459c1a861eae Mon Sep 17 00:00:00 2001 From: Root Date: Tue, 14 Mar 2023 17:03:15 +0530 Subject: [PATCH] Update _webhooks.md hmac.new expects key as bytearray or bytes not str. --- includes/_webhooks.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/_webhooks.md b/includes/_webhooks.md index 9923b90..b5a99dc 100644 --- a/includes/_webhooks.md +++ b/includes/_webhooks.md @@ -195,7 +195,7 @@ api_secret = api_secret.encode("ascii") payload = payload.encode("ascii") signature = hmac.new( -key='%s&%s' % (api_key, api_secret), +key=b'%s&%s' % (api_key, api_secret), msg=payload, digestmod=hashlib.sha1)