Created
April 3, 2019 14:39
-
-
Save enricop89/750536b66b969f67335126395acb7b08 to your computer and use it in GitHub Desktop.
How to compute bandyer signature in Webhook Methods
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const crypto = require('crypto'); | |
const data = { | |
event: "on_message_sent", | |
"event_version": "0.1", | |
"namespace": "chat", | |
"data": "{}" | |
} | |
const secret = 'ak_fake_123456789'; | |
const timestamp = '1554297654628'; | |
const bandyerSignature = crypto.createHmac('sha256', secret).update(`${timestamp}.${data}`).digest('hex')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment