# Auth0 Never Sends me an API Access Token for Audience

**URL:** <https://community.auth0.com/t/auth0-never-sends-me-an-api-access-token-for-audience/188041>\
**Category:** Get Help\
**Tags:** apis, application\
**Created:** [June 17, 2025, 12:38am UTC](https://community.auth0.com/t/auth0-never-sends-me-an-api-access-token-for-audience/188041 "2025-06-17T00:38:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![evan7](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/evan7/32/72118_2.png) [@evan7](https://community.auth0.com/u/evan7)\
**Post date:** [June 17, 2025, 12:38am UTC](https://community.auth0.com/t/auth0-never-sends-me-an-api-access-token-for-audience/188041/1 "2025-06-17T00:38:05Z")

</div>

Auth0 login for my React SPA works well ! 😀

But on a further call, the access token I receive from Auth0 doesn’t correspond to my API audience parameter. 😑

My Auth0 API is configured with an audience of `https://api.admin.app.com`

I’ve set up permissions and roles, and the user is assigned the role (and therefore the permission that’s requested below).

When the user navigates to a specific page, the front end calls:

```auto
const token = await getAccessTokenSilently({
  audience: 'https://api.admin.app.com',
  scope: 'read:accounts'
});

```

And i do receive a token in response. However when I decode the token on [jwt.io](http://jwt.io) the audience and scope are not correct!

```auto
{
  "iss": "https://dev-e3 ***hidden*** ev.us.auth0.com/",
  "sub": "auth0|67 ***hidden*** 0f",
  "aud": [
    "https://dev-e3 ***hidden*** ev.us.auth0.com/api/v2/",
    "https://dev-e3 ***hidden*** ev.us.auth0.com/userinfo"
  ],
  "iat": 1750119759,
  "exp": 1750206159,
  "scope": "openid profile email read:current_user",
  "azp": "bd ***hidden*** 0S"
}

```

So it looks like I’m getting back an access token for the management API and not for my custom API?

---

<div class="post-metadata">

**Author:** ![dawid.matuszczyk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dawid.matuszczyk/32/74550_2.png) [@dawid.matuszczyk](https://community.auth0.com/u/dawid.matuszczyk)\
**Post date:** [June 17, 2025, 2:28am UTC](https://community.auth0.com/t/auth0-never-sends-me-an-api-access-token-for-audience/188041/2 "2025-06-17T02:28:45Z")

</div>

Hi @evan7

Welcome to the Auth0 Community!

Thank you for posting your question. Can you try to get the access token with this change:

```auto
const token = await getAccessTokenSilently({
  authorizationParams: {
    audience: 'https://api.admin.app.com',
    scope: 'read:accounts' 
  },
});

```

Thanks  
Dawid

---

<div class="post-metadata">

**Author:** ![evan7](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/evan7/32/72118_2.png) [@evan7](https://community.auth0.com/u/evan7)\
**Post date:** [June 17, 2025, 2:49am UTC](https://community.auth0.com/t/auth0-never-sends-me-an-api-access-token-for-audience/188041/3 "2025-06-17T02:49:39Z")

</div>

Thank you @dawid.matuszczyk for your assistance!

I’ve made the change you suggested, and I think I’m on the right track now. I’m receiving however a `Consent Required` error during the `getAccessTokenSilently` method call.

If you have any suggestions on that it would be much appreciated!

Edit: To be clear, the error is not followed by a consent dialog. I assume it’s because I’m using a “silent” method call.

Edit: I caught the error and used the`loginWithPopup` method to handle the consent grant. It’s working well now!

Thank you!

---

<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:** [July 1, 2025, 2:50am UTC](https://community.auth0.com/t/auth0-never-sends-me-an-api-access-token-for-audience/188041/4 "2025-07-01T02:50:22Z")

</div>

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