# JWT in the body

**URL:** <https://community.postman.com/t/jwt-in-the-body/56704>\
**Category:** Help Hub\
**Tags:** jwt\
**Created:** [January 18, 2024, 12:31pm UTC](https://community.postman.com/t/jwt-in-the-body/56704 "2024-01-18T12:31:09Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [January 18, 2024, 4:51pm UTC](https://community.postman.com/t/jwt-in-the-body/56704/2 "2024-01-18T16:51:16Z")

</div>

Hey @telecoms-candidate12 👋

I don’t think that there is a straightforward way of doing that (I’m probably wrong though), there going to be a few moving parts and code to get what you need I believe.

We do have a JWT Helper under the Auth tab but as you require this in the request body, I don’t think that’s going to work for you.

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/0/6/064fe206cb9f06b97f3acc2d520a48dd52d83b00.png)

I’ve never done it like this so my responses are going to be based on a bit of research and learning as i’m going. 🙏

There is this older topic which is bringing an external lib to do some of the heavy lifting:

> [@External libraries for JWT encryption and protecting the Private Key](https://community.postman.com/t/external-libraries-for-jwt-encryption-and-protecting-the-private-key/32452):
>
> Hi, In our team we work extensively with [Adobe.io](http://Adobe.io) and Experience Cloud API’s We’ve recently come across a library that seems to meet our needs when it comes to encrypting a JWT token. For this we are using the Pre-request Script capability of Postman and this library [jsrsasign - cryptography library in JavaScript](https://kjur.github.io/jsrsasign/) Now I haven’t done a security audit on this library but I am conscious that the private key we are using could in fact be sent to a third party, obviously not good. So my question i…

This is also something similar which was asked and answered by someone who works at Postman so I could ask him to help out here.

> <https://stackoverflow.com/questions/59383521/postman-pre-request-script-to-create-jwt-for-google-service-account>

A lot of people are mentioned this util lib that could be brought into Postman via a CDN and stored at the global level. I can’t vouch for this though so it’s up to you if that’s something you want to use.

> **[postman-util-lib](https://joolfe.github.io/postman-util-lib/)**
>
> :rocket: A crypto utility library to be used from Postman Pre-request and Tests script tabs.

---

_[View the full topic](https://community.postman.com/t/jwt-in-the-body/56704)._
