# Generated access token is just having the header and no body. there is no sub in the access token

**URL:** <https://community.auth0.com/t/generated-access-token-is-just-having-the-header-and-no-body-there-is-no-sub-in-the-access-token/74286>\
**Category:** Get Help\
**Tags:** jwt, api, login, auth0\
**Created:** [December 6, 2021, 9:04am UTC](https://community.auth0.com/t/generated-access-token-is-just-having-the-header-and-no-body-there-is-no-sub-in-the-access-token/74286 "2021-12-06T09:04:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![harinatha.or](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/harinatha.or/32/33492_2.png) [@harinatha.or](https://community.auth0.com/u/harinatha.or)\
**Post date:** [December 6, 2021, 9:04am UTC](https://community.auth0.com/t/generated-access-token-is-just-having-the-header-and-no-body-there-is-no-sub-in-the-access-token/74286/1 "2021-12-06T09:04:33Z")

</div>

Hello, I am working on POC project and the technologies are angular is UI and Backend APIs are in JAVA. OIDC Client is configured in the Angular to retrieve the ID\_token and Access-token and the app receiving the both tokens successfully. when app decodes the id\_token everything looks good, but the access token is just having the header and no body. there is no sub in the access token. Can you please let me what could the issue in the access token?

---

<div class="post-metadata">

**Author:** ![john.gateley](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/john.gateley/32/10879_2.png) [@john.gateley](https://community.auth0.com/u/john.gateley)\
**Post date:** [December 6, 2021, 2:19pm UTC](https://community.auth0.com/t/generated-access-token-is-just-having-the-header-and-no-body-there-is-no-sub-in-the-access-token/74286/2 "2021-12-06T14:19:01Z")

</div>

Hi @harinatha.or

I think you have an opaque access token - this happens when you do not specify an audience. Opaque access tokens are not JWTs and cannot be decoded.

Specify an audience when you call /authorize and you will get an access token back.

John

---

<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:** [December 6, 2021, 5:07pm UTC](https://community.auth0.com/t/generated-access-token-is-just-having-the-header-and-no-body-there-is-no-sub-in-the-access-token/74286/3 "2021-12-06T17:07:57Z")

</div>

Thanks for helping on this one John!

---

<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:** [December 7, 2021, 2:32pm UTC](https://community.auth0.com/t/generated-access-token-is-just-having-the-header-and-no-body-there-is-no-sub-in-the-access-token/74286/4 "2021-12-07T14:32:32Z")

</div>


