# How to generate JWT token in Kong

**URL:** <https://discuss.konghq.com/t/how-to-generate-jwt-token-in-kong/9574>\
**Category:** General\
**Created:** [December 30, 2021, 4:22pm UTC](https://discuss.konghq.com/t/how-to-generate-jwt-token-in-kong/9574 "2021-12-30T16:22:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sachin\_Ghumbre](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/sachin_ghumbre/32/2737_2.png) [@Sachin\_Ghumbre](https://discuss.konghq.com/u/Sachin_Ghumbre)\
**Post date:** [December 30, 2021, 4:22pm UTC](https://discuss.konghq.com/t/how-to-generate-jwt-token-in-kong/9574/1 "2021-12-30T16:22:27Z")

</div>

I can see that kong’s jwt plugin can validate the jwt token, however it cannot generate the same. Similar to Oauth2.0 access token, may I know how exactly I can generate the jwt token in kong community?

---

<div class="post-metadata">

**Author:** ![fomm](https://avatars.discourse-cdn.com/v4/letter/f/ea666f/32.png) [@fomm](https://discuss.konghq.com/u/fomm)\
**Post date:** [December 31, 2021, 12:03am UTC](https://discuss.konghq.com/t/how-to-generate-jwt-token-in-kong/9574/2 "2021-12-31T00:03:17Z")

</div>

[JSON Web Token Libraries - jwt.io](https://jwt.io/libraries) lists libraries for different programming languages that you can use for generating JWT tokens.

---

<div class="post-metadata">

**Author:** ![Sachin\_Ghumbre](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/sachin_ghumbre/32/2737_2.png) [@Sachin\_Ghumbre](https://discuss.konghq.com/u/Sachin_Ghumbre)\
**Post date:** [December 31, 2021, 4:22am UTC](https://discuss.konghq.com/t/how-to-generate-jwt-token-in-kong/9574/3 "2021-12-31T04:22:34Z")

</div>

I am looking for the kong plugin that will generate the jwt token.

---

<div class="post-metadata">

**Author:** ![fomm](https://avatars.discourse-cdn.com/v4/letter/f/ea666f/32.png) [@fomm](https://discuss.konghq.com/u/fomm)\
**Post date:** [December 31, 2021, 5:51am UTC](https://discuss.konghq.com/t/how-to-generate-jwt-token-in-kong/9574/4 "2021-12-31T05:51:49Z")

</div>

Are you expecting Kong to be generating and authenticating its own generated JWT?

---

<div class="post-metadata">

**Author:** ![Sachin\_Ghumbre](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/sachin_ghumbre/32/2737_2.png) [@Sachin\_Ghumbre](https://discuss.konghq.com/u/Sachin_Ghumbre)\
**Post date:** [December 31, 2021, 6:08am UTC](https://discuss.konghq.com/t/how-to-generate-jwt-token-in-kong/9574/5 "2021-12-31T06:08:47Z")

</div>

Yes, looking for kong plugin which will generate and authenticate the jwt token.  
for example other API gateway products like Apigee, CA API gateway have their own policies/plugins where we can just configure the header, body and signature stuffs and rest of the job of token generation and validation is done by the gateway.
