Postman Private Key JWT Authentication

Hello,

I’m trying to use Private Key JWT token for machine to machine authentication.
I’m testing with Postman and I’m trying to see how people do it? If possible I would like something fully automated where a pre-script would see if I already have a non expired token in variables. If the token is missing or expired I would got fetch a new one.

Before automating, I tried using the Postman Authorization Tab with the “JWT Bearer” option. This solution help generate the Private Key JWT token for the client assertion however the output is either a header or a query param. I could not find the official API documentation for /oauth/token endpoint. In the only example I found, the client assertion should be in the x-www-form-urlencoded body. Is there another option for the /oauth/token API call that is not documented? Currently I have to manually copy the token generated to the correct field.

Let me know if you have any question.

Thanks
Yann