Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

491
Views
How do I iterate/loop an API request that has a JavaScript pre-request script in Postman?

I have an API endpoint that returns a maximum of 50 records per page. I need to extract data from subsequent pages and would normally write a loop in Python, but in this case the data provider has supplied a collection in Postman that runs a pre-request JavaScript script and creates a hash (for security/verification reasons). I am assuming that this pre-request needs to run for each iteration. The pre-request code that runs in Postman is supplied in the prerequest.js file

I have tried to convert this to Python but receive the message:

{"error":"Invalid signature","message":"The 'mac' value does not match the signature of the request. Ensure the 'mac' is calculated correctly using your secret and the request body is not being altered."}

In summary, I have a pre-request in JavaSript in Postman; I have a Python template that would usually achieve the looping (with other data sources). I need help to iterate in Postman or by running a Python script outside of Postman. All files referred to are available in my Github repository

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!