As we are Working on using event Subscriptions for our App, we came across a problem. While verifying webhook events in our side the hashed value from the constructed message and the header signature x-zm-signature does not match.
But while validating the endpoint url during initialising event subscriptions the function runs correctly and our endpoint url got validated. We have done the procedures correctly as mentioned but the signature and hashed values are not the same.
We have looked through the devforum and One user has mentioned about serialization/deserialization of
an object. We are having the same problem here. Can you please look onto it.
We are not using Node.js for validation functions, we are validating it in the backend, and so we are using Java for validating the request.
Actually we have rectified the problem by ourselves. When we read the request body, the output will be in bytes then converted to String and then we have to convert it into a JSONObject. And that’s when the order of the details changes(In the JSON), but when we print the String that we get from the bytes conversion, it will be in the right order so we just used the String instead of using the converted String of the JSON(JSON.toString()). See below for better explaination.