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

127
Views
Postman pre-request script does not set the variable for an access token

I am trying to make a pre-request script for request A that executes another request B for a login function and generating an access token that is saved to a variable but the problem is that for some reason the pre-request script is not executed, the access token remains null and request A will fail due to invalid token error 401.

Request B has basic Authorization in the headers

If I run request B individually it is run successfully and the variable I set gets updated correctly.

This is the script I am using in request A to execute request B

pm.sendRequest("url.example/post", function (err, response) { console.log(response.json()); });

What could be wrong ? Is there any other info i need to provide ?

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!