Unable to Generate the hmac/signature, for Authorization (Header Variable), Programatically.

Hey There,

I hope you are having a great time.

I am using the Postman Collection and Environment, been provided via email, and I can hit the API's we need correctly using Postman. I looked into the Quick Start link, been shared with us and I got the sample JavaScript code for hmac signature creation, over here. We have also tested this JavaScript code in the Postman Pre-request Script but it is throwing an error.

We translated that code to Php but it is not creating a valid hmac and we are getting a 401 Unauthorized response, whenever we hit an API from our code/application. Even though we used the hard coded values, the same as the Postman request is using, it doesn't generate a valid hmac.

Can we get any help here?

Best Answer

  • Hello @it09 - thank you for reaching out to us! Apologies that you are encountering errors. Would you mind providing me with your professional/work email to judith.pillado@lseg.com? I would like to send you step-by-step HMAC documentation that you can follow along to create a successful authorization header. Looking forward to your response!

    Blessings,
    Judith