# How to get JWT token?

**URL:** <https://community.auth0.com/t/how-to-get-jwt-token/181431>\
**Category:** Get Help\
**Tags:** sessions, access-token\
**Created:** [February 5, 2025, 3:12am UTC](https://community.auth0.com/t/how-to-get-jwt-token/181431 "2025-02-05T03:12:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![abdur258rahman258](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/abdur258rahman258/32/72610_2.png) [@abdur258rahman258](https://community.auth0.com/u/abdur258rahman258)\
**Post date:** [February 5, 2025, 3:12am UTC](https://community.auth0.com/t/how-to-get-jwt-token/181431/1 "2025-02-05T03:12:22Z")

</div>

Hi everyone,

I’m currently integrating the [White-Label App](https://www.unit.co/docs/white-label-uis/white-label-app) and need to set up authentication.

As part of the authentication process, the user should receive a JWT token, but I’m only getting an access token instead. I came across a community post mentioning that passing the `audience` parameter can help obtain a valid JWT access token. However, I’m unsure how to implement this in my code.

Here is my code: [GitHub](https://github.com/rakibul-wdp/my-website).

Could someone guide me on how to properly retrieve a valid JWT token? I’d really appreciate any help or insights.

---

<div class="post-metadata">

**Author:** ![Fario\_Consulting](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/fario_consulting/32/60590_2.png) [@Fario\_Consulting](https://community.auth0.com/u/Fario_Consulting)\
**Post date:** [February 5, 2025, 9:39am UTC](https://community.auth0.com/t/how-to-get-jwt-token/181431/2 "2025-02-05T09:39:37Z")

</div>

Hi,  
You would need to specify the audience parameter when creating your Auth0 client. Basically once the audience value is updated during the creation of the Auth0 client, the access\_token returned will be a JWT with the correct audience entries  
Hope this helps!

---

<div class="post-metadata">

**Author:** ![abdur258rahman258](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/abdur258rahman258/32/72610_2.png) [@abdur258rahman258](https://community.auth0.com/u/abdur258rahman258)\
**Post date:** [February 5, 2025, 11:21am UTC](https://community.auth0.com/t/how-to-get-jwt-token/181431/3 "2025-02-05T11:21:16Z")

</div>

To specify the audience parameter, I need to create an API.  
But If I don’t want to create API, then how can I get a valid JWT token?  
Is it required to create an API to get a valid JWT token?

---

<div class="post-metadata">

**Author:** ![vlad.murarasu](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/vlad.murarasu/32/72793_2.png) [@vlad.murarasu](https://community.auth0.com/u/vlad.murarasu)\
**Post date:** [February 25, 2025, 8:26pm UTC](https://community.auth0.com/t/how-to-get-jwt-token/181431/4 "2025-02-25T20:26:16Z")

</div>

Hi @abdur258rahman258,

As stated in this [knowledge post](https://community.auth0.com/t/what-is-the-audience/71414), yes, the audience is an API that the App can use. You will need to create one.

If you have any other questions feel free to ask.

Have a good one,  
Vlad

---

<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:** [March 11, 2025, 8:26pm UTC](https://community.auth0.com/t/how-to-get-jwt-token/181431/5 "2025-03-11T20:26:47Z")

</div>

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