Hello - just in case anyone else runs into this issue. It was impossible for me to use a webhook from a web-app running in a browser.
We have now changed our approach as follows:
- the webhooks seem to be an option only for machine to machine communication (definitely not through a browser)
- we have written realm functions that a dedicated logged in user can execute. With the web-sdk these functions can be used like any other javascript function
- we now use the Web-SDK (https://docs.mongodb.com/realm/web/quickstart/) to do the following
a) authenticate a user (we are using api key authentication)
b) using that user, we execute the corresponding function to read / submit data to our mongodb
Works a treat.