# Postman Private Key JWT Authentication

**URL:** <https://community.auth0.com/t/postman-private-key-jwt-authentication/126202>\
**Category:** Get Help\
**Tags:** documentation-request, customer-feedback\
**Created:** [January 31, 2024, 6:31pm UTC](https://community.auth0.com/t/postman-private-key-jwt-authentication/126202 "2024-01-31T18:31:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yann.Mathieu](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/yann.mathieu/32/61864_2.png) [@Yann.Mathieu](https://community.auth0.com/u/Yann.Mathieu)\
**Post date:** [January 31, 2024, 6:31pm UTC](https://community.auth0.com/t/postman-private-key-jwt-authentication/126202/1 "2024-01-31T18:31:25Z")

</div>

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](https://auth0.com/docs/api/authentication#client-credentials-flow). In the only [example](https://auth0.com/docs/get-started/authentication-and-authorization-flow/authenticate-with-private-key-jwt#supported-endpoints) 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

---

<div class="post-metadata">

**Author:** ![dawid.matuszczyk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dawid.matuszczyk/32/74550_2.png) [@dawid.matuszczyk](https://community.auth0.com/u/dawid.matuszczyk)\
**Post date:** [December 31, 2025, 2:40pm UTC](https://community.auth0.com/t/postman-private-key-jwt-authentication/126202/3 "2025-12-31T14:40:22Z")

</div>

Hi There!

For future reference, automating token creation in Postman can be achieved using the Postman pre-request tab and the jsrsasign library to fetch the key and paste it at the collection level.

> **[Write pre-request scripts to add dynamic behavior in Postman | Postman Docs](https://learning.postman.com/docs/tests-and-scripts/write-scripts/pre-request-scripts/)**
>
> Use pre-request scripts in Postman to run JavaScript before a request runs.

Thanks!  
Dawid

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [January 14, 2026, 2:40pm UTC](https://community.auth0.com/t/postman-private-key-jwt-authentication/126202/4 "2026-01-14T14:40:24Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
