# The getAccessToken in Nextjs returns opaque token instead of access token even after specifying the audience

**URL:** <https://community.auth0.com/t/the-getaccesstoken-in-nextjs-returns-opaque-token-instead-of-access-token-even-after-specifying-the-audience/146457>\
**Category:** Get Help\
**Tags:** classic-universal-login-experience, login-experience\
**Created:** [September 11, 2024, 2:58pm UTC](https://community.auth0.com/t/the-getaccesstoken-in-nextjs-returns-opaque-token-instead-of-access-token-even-after-specifying-the-audience/146457 "2024-09-11T14:58:37Z")\
**Posts on this page:** 1\
**Showing post:** 14

<div class="post-metadata">

**Author:** ![nik.baleca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nik.baleca/32/68749_2.png) [@nik.baleca](https://community.auth0.com/u/nik.baleca)\
**Post date:** [February 19, 2025, 10:38pm UTC](https://community.auth0.com/t/the-getaccesstoken-in-nextjs-returns-opaque-token-instead-of-access-token-even-after-specifying-the-audience/146457/14 "2025-02-19T22:38:45Z")

</div>

Hi @vishnukumart96

Welcome to the Auth0 Community and I am sorry about the late reply to your inquiry!

For anyone who may be looking for a solution to this issue, I would recommend to review this community post regarding receiving an opaque access token:

- [@auth0/nextjs-auth0 tokens and external api help](https://community.auth0.com/t/auth0-nextjs-auth0-tokens-and-external-api-help/71072)

In general, an opaque access token is returned because the right `audience` or `scope` was not passed in as parameters, the application was not registered with the Management API or the right grants are not enabled for your application.

Usually, if you are using a custom API, you will need to register it within Your Auth0 Dashboard and then create an [M2M application](https://auth0.com/docs/get-started/auth0-overview/create-applications/machine-to-machine-apps) in order for your api to communicate with Auth0’s Management API.

You can also review our documentation about [Access Tokens](https://auth0.com/docs/secure/tokens/access-tokens/get-access-tokens#control-access-token-audience).

Hopefully, the provided information above is useful in resolving the issues you might encounter with opaque access tokens!

If you have any other questions, feel free to leave a reply or to post again on the community!

Kind Regards,  
Nik

---

_[View the full topic](https://community.auth0.com/t/the-getaccesstoken-in-nextjs-returns-opaque-token-instead-of-access-token-even-after-specifying-the-audience/146457)._
