Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

125
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda