# Not possible to generare a Signature for a JWT within PreRequest

**URL:** <https://community.postman.com/t/not-possible-to-generare-a-signature-for-a-jwt-within-prerequest/68870>\
**Category:** Help Hub\
**Tags:** pre-request-script, signature, crypto, external-library, jwt\
**Created:** [September 25, 2024, 4:13pm UTC](https://community.postman.com/t/not-possible-to-generare-a-signature-for-a-jwt-within-prerequest/68870 "2024-09-25T16:13:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dmarengo-almaviva](https://avatars.discourse-cdn.com/v4/letter/d/73ab20/32.png) [@dmarengo-almaviva](https://community.postman.com/u/dmarengo-almaviva)\
**Post date:** [September 25, 2024, 4:13pm UTC](https://community.postman.com/t/not-possible-to-generare-a-signature-for-a-jwt-within-prerequest/68870/1 "2024-09-25T16:13:44Z")

</div>

Within the Postman Pre-Request script section, very usefull to prepare data before the actual Rest API call, it seems totally impossible to **create a standard signature for a JWT structure**.

A super-mandatory step if you want to correctly sign the token or in general a message with your own private key before sending it in the request.

Ok that Postman support the ‘ **crypto-js** ’ library for crypto stuff, but it does not look like a full version with all the (security) standard functionalities that are required of an API client. And it seems there are not other options since it **seems impossible to import other (external) modules** within the nodejs runtime used by Postman, nor to include/import other js libraries that easily fulfil the purpose.

So it’s really a dead end, and a bad one since we are talking about security standards for APIs related to JWT tokens.

Please help 🙂

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/system/32/29796_2.png) [@system](https://community.postman.com/u/system)\
**Post date:** [October 25, 2024, 4:14pm UTC](https://community.postman.com/t/not-possible-to-generare-a-signature-for-a-jwt-within-prerequest/68870/2 "2024-10-25T16:14:10Z")

</div>

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