Skip to Content

Welcome!

This community is for professionals and enthusiasts of our products and services.
Share and discuss the best content and new marketing ideas, build your professional profile and become a better marketer together.

شما نیاز به ثبت‌نام دارید تا بتوانید با جامعه تعامل داشته باشید.
این سوال علامت‌گذاری شده است
1 پاسخ
157 نماها

Explains webhook verification for Public Apps, with Python code.

آواتار
رها کردن
مولف پاسخ برتر
  • For Public Apps, verify X-Shopify-Hmac-Sha256 using Shared Secret.
  • Python Example:
  • import hmac, hashlib, base64
  • def verify_webhook(data, hmac_header, secret):
  •     digest = hmac.new(secret.encode('utf-8'), data if isinstance(data, bytes) else data.encode('utf-8'), hashlib.sha256).digest()
  •     return hmac.compare_digest(base64.b64encode(digest).decode(), hmac_header)


آواتار
رها کردن
نوشته های مرتبط پاسخ‌ها نماها فعالیت
1
MMM yy 
153
1
MMM yy 
142
1
MMM yy 
137
1
MMM yy 
127
1
MMM yy 
110