Q: Pre-request script feature as in Postman (to sign requests)?
Hello, so I bought Nativerest and I'm trying to use it to build an integration to a service (https://developers.3commas.io/quick-start/signing-a-request-using-hmac-sha256). However, for this I need to generate a custom HMAC signature for each request based on my secret key.
With Postman I have the pre-request feature that can do this. However, how can I do this in NativeRest?
I can of course do this in the Mac terminal, but it's just quite a pain to work like this whenever you make requests.

uhaleks
Jun 26, 2025A: Hello! π
Thank you for purchasing NativeRest. β¨
Currently, NativeRest only has a sha256 hashing function with one parameter. It won't work in this case. I looked at the API on your link and understand what is required. In a few days, I will add the hmac-sha256 function with two parameters to NativeRest. I'll reply to you here additionally as soon as it appears in NativeRest. π

Verified purchaser
Awesome man! Thank you and much appreciated! Really looking forward to your update!

Verified purchaser
Hi, I'm curious if there's any updates on this?
Hi! Yes, I have great news!
Right now the new version of NativeRest 2.6.2 is available. I just finished the necessary release notes and wanted to write to you.
Now you need to use the new hmac.sha256 function to fill in the Signature header.
This function has 2 parameters: Data, Key.
In the first - payload, and in the second - secret.
Signature: {{hmac.sha256({{payload}},{{secret}})}}
This is a continuation of my answer:
In my example, 2 parameters are declared payload and secret, in which the values ββare written:
payload = /public/api/ver1/users/change_mode?mode=paper
secret = NhqPtmdSJYdKjVHj...
In my opinion, variables are more convenient, but it is not necessary to use them.
See an example of using hmac.sha256 in NativeRest in this screenshot:
https://nativesoft.com/static/images/using-hmac-sha256-function.png