Why does my webhook hmac verification fail with Node.js?

Hello

I am trying to validate webhook hmac verification with just nodejs but always getting verification failed. I am passing valid app secret key.

this is how my code looks
var hmacByCrypto = crypto
.createHmac(‘sha256’, client_secret)
.update(JSON.stringify(context.params))
.digest(‘base64’);

I am receiving body in context.params field