Stitch Webhook URL with JWT

This is regrading MongoDB Stitch External service. How can I configure Mongodb Stitch webhook URL to be called with a jwt token? ( if I store a secret key in Stitch, it should authorize the request before calling function ).

1 Like

Hi Roshan – You should be able to configure this by following these two steps –

  1. Configure a Custom Auth Provider – by providing a signing key or jwks uri you will be able to use your token to authenticate Stitch requests
  2. Set your webhook to use application authentication and then pass in your JWT in either the request header or body

Hope that helps!

1 Like


Because webhooks only support JWT Tokens and not google auth.

Can I set the JWK URI ->

And validate the token through jwktokenstring in the header?

It keeps returning invalid session on Stitch