# Auth0 getAccessToken() and getSession() Not Working in Next.js 15 App Router (Server & Client Components)

**URL:** <https://community.auth0.com/t/auth0-getaccesstoken-and-getsession-not-working-in-next-js-15-app-router-server-client-components/185745>\
**Category:** Get Help\
**Tags:** sessions, access-token\
**Created:** [April 21, 2025, 11:30am UTC](https://community.auth0.com/t/auth0-getaccesstoken-and-getsession-not-working-in-next-js-15-app-router-server-client-components/185745 "2025-04-21T11:30:29Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![vlad.murarasu](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/vlad.murarasu/32/72793_2.png) [@vlad.murarasu](https://community.auth0.com/u/vlad.murarasu)\
**Post date:** [April 22, 2025, 5:00pm UTC](https://community.auth0.com/t/auth0-getaccesstoken-and-getsession-not-working-in-next-js-15-app-router-server-client-components/185745/5 "2025-04-22T17:00:45Z")

</div>

Hi @nithinsriharir,

Thank you for this info.

Looking further into it I found a great post that seems to address this issue:

> [@The getAccessToken in Nextjs returns opaque token instead of access token even after specifying the audience](https://community.auth0.com/t/the-getaccesstoken-in-nextjs-returns-opaque-token-instead-of-access-token-even-after-specifying-the-audience/146457/14):
>
> 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 gra…

Let us know if this solves your issue.

Have a good one,  
Vlad

---

_[View the full topic](https://community.auth0.com/t/auth0-getaccesstoken-and-getsession-not-working-in-next-js-15-app-router-server-client-components/185745)._
