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

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:

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 in order for your api to communicate with Auth0’s Management API.

You can also review our documentation about Access Tokens.

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