# Cannot read headers on tokens

**URL:** <https://community.auth0.com/t/cannot-read-headers-on-tokens/51669>\
**Category:** Get Help\
**Tags:** api\
**Created:** [October 15, 2020, 8:12pm UTC](https://community.auth0.com/t/cannot-read-headers-on-tokens/51669 "2020-10-15T20:12:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lightscalar](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lightscalar/32/24956_2.png) [@lightscalar](https://community.auth0.com/u/lightscalar)\
**Post date:** [October 15, 2020, 8:12pm UTC](https://community.auth0.com/t/cannot-read-headers-on-tokens/51669/1 "2020-10-15T20:12:40Z")

</div>

I have a Vue.js SPA and is trying to communicate with a Python (FastAPI) backend API. Unfortunately, I am unable to decode the token headers.

In particular, the line

`unverified_header = jwt.get_unverified_header(token)`

is failing with an error,

`jose.exceptions.JWTError: Error decoding token headers.`

I am getting the token on the clientside with a call to:

`const token = await this.$auth.getTokenSilently();`

as indicated in the documentation. However, the token which this generates (and which is successfully passed to the Python side" looks something like,

`R4TKoadKGx5YOgiggTNqr0xAEwFHm4Xg`

Which looks not much like JWTs that I’ve worked with previously. Am I missing something here?

Thanks,

---

<div class="post-metadata">

**Author:** ![sidharth.chaudhary](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sidharth.chaudhary/32/20686_2.png) [@sidharth.chaudhary](https://community.auth0.com/u/sidharth.chaudhary)\
**Post date:** [October 15, 2020, 10:09pm UTC](https://community.auth0.com/t/cannot-read-headers-on-tokens/51669/2 "2020-10-15T22:09:24Z")

</div>

Hey @lightscalar, Welcome to the Auth0 Community!

This looks like an opaque access token:  
Opaque token is a form of Access token which is provided if you have not added an “Audience” Parameter in the /authorize request. If you add an audience parameter it will provide you a JWT token. Without audience it will be an opaque token

> **[Get Access Tokens](https://auth0.com/docs/secure/tokens/access-tokens/get-access-tokens)**
>
> Learn how to request Access Tokens using the Authorize endpoint when authenticating users and include the target audience and scope of access requested by the app and granted by the user.

> **[Access Tokens](https://auth0.com/docs/secure/tokens/access-tokens)**
>
> Describes how access tokens are used in token-based authentication to allow an application to access an API after a user successfully authenticates and authorizes access.

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [October 16, 2020, 1:32pm UTC](https://community.auth0.com/t/cannot-read-headers-on-tokens/51669/3 "2020-10-16T13:32:52Z")

</div>

Thanks Sidharth for providing the explanation on the difference of those.

---

<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:** [October 31, 2020, 1:33pm UTC](https://community.auth0.com/t/cannot-read-headers-on-tokens/51669/4 "2020-10-31T13:33:06Z")

</div>

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