# How to use opaque token in Flask Backend?

**URL:** <https://community.auth0.com/t/how-to-use-opaque-token-in-flask-backend/63775>\
**Category:** Get Help\
**Tags:** angular, flask, auth0\
**Created:** [June 2, 2021, 11:11pm UTC](https://community.auth0.com/t/how-to-use-opaque-token-in-flask-backend/63775 "2021-06-02T23:11:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aravind0136](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/aravind0136/32/25744_2.png) [@aravind0136](https://community.auth0.com/u/aravind0136)\
**Post date:** [June 2, 2021, 11:11pm UTC](https://community.auth0.com/t/how-to-use-opaque-token-in-flask-backend/63775/1 "2021-06-02T23:11:44Z")

</div>

I’m logging my users in using Auth0 and getting back an opaque token which I’m passing on to Flask backend API.

- How do I validate these opaque tokens?
- How do I protect every request?
- How to I get user info on every request?

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [June 3, 2021, 2:59pm UTC](https://community.auth0.com/t/how-to-use-opaque-token-in-flask-backend/63775/3 "2021-06-03T14:59:09Z")

</div>

Hi @aravind0136,

Welcome to the Community!

An opaque token is intended to be exchanged for a user profile via the [/userprofile endpoint](https://auth0.com/docs/api/authentication#user-profile).

If you want to secure the requests between your web app and a backend API, you will want to receive a JWT token that can be verified by your application. To return a JWT, you need to specify and audience when you request the token (the audience will be the API consuming the token).

Here is an FAQ about it:

[https://community.auth0.com/t/why-is-my-access-token-not-a-jwt-opaque-token/31028](https://community.auth0.com/t/why-is-my-access-token-not-a-jwt-opaque-token/31028)

---

<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:** [July 13, 2021, 4:31pm UTC](https://community.auth0.com/t/how-to-use-opaque-token-in-flask-backend/63775/4 "2021-07-13T16:31:44Z")

</div>

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