# I'm trying to test the API protection flow but I don't know where to set private key for the JWT token

**URL:** <https://community.auth0.com/t/im-trying-to-test-the-api-protection-flow-but-i-dont-know-where-to-set-private-key-for-the-jwt-token/119322>\
**Category:** Get Help\
**Tags:** apis, application\
**Created:** [October 25, 2023, 6:25am UTC](https://community.auth0.com/t/im-trying-to-test-the-api-protection-flow-but-i-dont-know-where-to-set-private-key-for-the-jwt-token/119322 "2023-10-25T06:25:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![liurunlin0213](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/liurunlin0213/32/51369_2.png) [@liurunlin0213](https://community.auth0.com/u/liurunlin0213)\
**Post date:** [October 25, 2023, 6:25am UTC](https://community.auth0.com/t/im-trying-to-test-the-api-protection-flow-but-i-dont-know-where-to-set-private-key-for-the-jwt-token/119322/1 "2023-10-25T06:25:31Z")

</div>

Hi there. I’m new to all the authentication flows and I’m trying the Test steps located in my dashboard/applications/APIs section. The bearer token returned from the authentication link([https://dev-xxx.us.auth0.com/oauth/token](https://dev-xxx.us.auth0.com/oauth/token)) should be able to be decoded. But the Java function for configuring algorithms(Algorithm RSA256(RSAPublicKey, RSAPrivateKey)) requires both keys.

Is it an enterprise tier feature? If not, where can I find both keys?

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [October 26, 2023, 12:55am UTC](https://community.auth0.com/t/im-trying-to-test-the-api-protection-flow-but-i-dont-know-where-to-set-private-key-for-the-jwt-token/119322/3 "2023-10-26T00:55:01Z")

</div>

Hey there @liurunlin0213 welcome to the community!

> [@liurunlin0213](#):
>
> But the Java function for configuring algorithms(Algorithm RSA256(RSAPublicKey, RSAPrivateKey)) requires both keys.

Are you sure the function you are looking at isn’t for signing a token rather than validating it? Typically, in order to verify a token you just need the public key which can be found at `https://{your_domain}/.well-known/jwks.json` - See [JSON Web Key Sets](https://auth0.com/docs/secure/tokens/json-web-tokens/json-web-key-sets) for more info.

We have a Java quickstart using Springboot which may be helpful just for demonstration purposes:

[https://auth0.com/docs/quickstart/backend/java-spring-security5#validate-access-tokens](https://auth0.com/docs/quickstart/backend/java-spring-security5#validate-access-tokens)

---

<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:** [November 9, 2023, 12:55am UTC](https://community.auth0.com/t/im-trying-to-test-the-api-protection-flow-but-i-dont-know-where-to-set-private-key-for-the-jwt-token/119322/4 "2023-11-09T00:55:44Z")

</div>

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