Get logged user username into enviroment variable or pre-request script

Hello everyone!
I’m using postman to automate some operation tasks, and I have a set of apis that require a username parameter.
I was wondering if it’s possible to use the username of the logged in user (I’m talking about the app here) instead of having the user setting an environment variable or typing his name himself.
Is the login username exposed somehow? Can I get it into the pre-request script?

Thanks in advance!

By login information, do mean the details about the current logged in account in Postman or the information returned by your API?

1 Like

Current logged in account in Postman - I just need the username

I don’t think there is a way to do that as of now. Feel free to create a feature request on Github - https://github.com/postmanlabs/postman-app-support/issues.

Done :slight_smile: