# Generating JWT via API

**URL:** <https://community.auth0.com/t/generating-jwt-via-api/89248>\
**Category:** JWT.io\
**Tags:** api\
**Created:** [August 23, 2022, 9:05am UTC](https://community.auth0.com/t/generating-jwt-via-api/89248 "2022-08-23T09:05:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sarangtkg.1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sarangtkg.1/32/33507_2.png) [@sarangtkg.1](https://community.auth0.com/u/sarangtkg.1)\
**Post date:** [August 23, 2022, 9:05am UTC](https://community.auth0.com/t/generating-jwt-via-api/89248/1 "2022-08-23T09:05:51Z")

</div>

Hi Experts, Is there a way to generate JWT via API from [jwt.io](http://jwt.io)

---

<div class="post-metadata">

**Author:** ![john.gateley](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/john.gateley/32/10879_2.png) [@john.gateley](https://community.auth0.com/u/john.gateley)\
**Post date:** [August 23, 2022, 12:54pm UTC](https://community.auth0.com/t/generating-jwt-via-api/89248/2 "2022-08-23T12:54:16Z")

</div>

Hi @sarangtkg.1

Depends on what you mean. You can generate a JWT via the client credentials grant (also known as a M2M token). But if you are talking about a user access token, you must authenticate.

John

---

<div class="post-metadata">

**Author:** ![leydar](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/leydar/32/12715_2.png) [@leydar](https://community.auth0.com/u/leydar)\
**Post date:** [August 23, 2022, 1:42pm UTC](https://community.auth0.com/t/generating-jwt-via-api/89248/3 "2022-08-23T13:42:38Z")

</div>

There’s a list of libraries you can use in your own code to generate one (`https://jwt.io/libraries`). Or you can retrieve one from an authenticated user on Auth0.

---

<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:** [May 31, 2024, 4:05pm UTC](https://community.auth0.com/t/generating-jwt-via-api/89248/4 "2024-05-31T16:05:44Z")

</div>

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