# Validating an Access Token

**URL:** <https://community.auth0.com/t/validating-an-access-token/71540>\
**Category:** Get Help\
**Created:** [October 18, 2021, 10:34pm UTC](https://community.auth0.com/t/validating-an-access-token/71540 "2021-10-18T22:34:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gsinha](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/gsinha/32/26486_2.png) [@gsinha](https://community.auth0.com/u/gsinha)\
**Post date:** [October 18, 2021, 10:34pm UTC](https://community.auth0.com/t/validating-an-access-token/71540/1 "2021-10-18T22:34:45Z")

</div>

Hi team

I want to validate access token from the gateway. Which service should I hit in Auth0 to do so?

I am looking for something equivalent of introspection end point provided by okta

> **[OpenID Connect & OAuth 2.0 API | Okta Developer](https://developer.okta.com/docs/reference/api/oidc/#introspect)**
>
> Find information about the OAuth 2.0 and OpenID Connect endpoints that Okta exposes on its authorization servers.

---

<div class="post-metadata">

**Author:** ![Ale](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ale/32/50860_2.png) [@Ale](https://community.auth0.com/u/Ale)\
**Post date:** [October 19, 2021, 12:57am UTC](https://community.auth0.com/t/validating-an-access-token/71540/2 "2021-10-19T00:57:06Z")

</div>

Welcome to the Auth0 Community, @gsinha!

We don’t have an equivalent endpoint to the `/introspect` endpoint from Okta. You would have two options: either use the token and see if it’s valid or inspect it using a library of your choice (you can grab one from [JSON Web Token Libraries - jwt.io](https://jwt.io/libraries) for example)

I recommend you to read [https://auth0.com/docs/security/tokens/access-tokens/validate-access-tokens](https://auth0.com/docs/security/tokens/access-tokens/validate-access-tokens) to learn more about this topic.

If you would like to see a similar endpoint or any other feature supported, I suggest you [send your feedback](https://auth0.com/feedback) explaining your use case and giving as many details as possible so we all can understand your requirements.

I hope this helps.

---

<div class="post-metadata">

**Author:** ![gsinha](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/gsinha/32/26486_2.png) [@gsinha](https://community.auth0.com/u/gsinha)\
**Post date:** [October 19, 2021, 1:14am UTC](https://community.auth0.com/t/validating-an-access-token/71540/3 "2021-10-19T01:14:06Z")

</div>

A quick follow on question

1. Can you elaborate on “either use the token and see if it’s valid”.  
 → What I understood is you are suggesting is I should call some service like “/userInfoendpoint” using access token and if it goes through ,my access token is valid. Is that what you mean to say?

2. What is the recommended approach - \> using JWT library or going back to Auth0 for validation?

---

<div class="post-metadata">

**Author:** ![Ale](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ale/32/50860_2.png) [@Ale](https://community.auth0.com/u/Ale)\
**Post date:** [October 20, 2021, 10:18pm UTC](https://community.auth0.com/t/validating-an-access-token/71540/4 "2021-10-20T22:18:59Z")

</div>

> [@gsinha](#):
>
> Can you elaborate on “either use the token and see if it’s valid”.  
> → What I understood is you are suggesting is I should call some service like “/userInfoendpoint”

Yes. That’s one example. Calling the `/userinfo` endpoint with the Access Token. This leads me to your next question below.

> [@gsinha](#):
>
> What is the recommended approach - \> using JWT library or going back to Auth0 for validation?

I would “always” say JWT library. My question here is: why are you trying to validate the Access Token **before** actually using/sending it? Could you please describe your use case as detailed as possible? To me, trying to validate the Access Token before actually using the Access Token does not make much sense. i.e. it is the responsibility of the API/backend to accept or reject the Access Token. Why don’t you want to just send/use it?

---

<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:** [August 30, 2024, 8:41pm UTC](https://community.auth0.com/t/validating-an-access-token/71540/5 "2024-08-30T20:41:12Z")

</div>

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