Postman Setup
Use a Postman pre-request script to generate HMAC signatures automatically for every request in a collection.
Pre-request Script
Add this to the collection-level or request-level Pre-request Script tab:
Setup Steps
- Create or select a Postman environment.
- Add
api_keyandsecret_keyvariables. - Paste the script at the collection level so all requests inherit it.
- Send a signed request to a client API endpoint.
- Use the Postman console to inspect the generated timestamp and signature if debugging is needed.
Troubleshooting
Missing credentials
Make sure the active Postman environment contains both:
api_keysecret_key
Invalid signature
Check that:
- the body in Postman is exactly what gets sent
- the correct secret key is loaded
- no conflicting headers are being set manually
CryptoJS errors
Postman ships with CryptoJS. If it is unavailable, update Postman before debugging the API integration itself.