Postman custom authentication

Viewed 4201

Is there a way on Postman to pre-execute a request B before executing a request A ?

CONTEXT: I created a Symfony application that manages a set of webservices. Most of the routes can only be called once the user is fully authenticated (using form_login and firewall for those who are familiar with the framework)

Therefore, I have to call first:

POST /login

  • username
  • password

before being able to call

GET /some_secured_route

(that return a JSON response)

This works fine when I call the routes successively and manually in the Postman builder.


However, I'm trying to create a collection of test to run in the Postman runner. How can I invoke to call the the /login request before testing the a secured route ?

  • Is there a way to do so in the Pre-request script in the Postman builder ?
  • Postman supports several type of Authorization, (Basic Auth, Digest Auth, OAuth...). Does it support somehow a custome one ?

Any help or link to related post would be much appreciated. I wish you all a very good day.

2 Answers
Related