# Audiences in Jwt are not allowed

**URL:** <https://community.auth0.com/t/audiences-in-jwt-are-not-allowed/129532>\
**Category:** Get Help\
**Tags:** clients, management-api\
**Created:** [March 12, 2024, 4:15pm UTC](https://community.auth0.com/t/audiences-in-jwt-are-not-allowed/129532 "2024-03-12T16:15:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sahil2](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sahil2/32/52395_2.png) [@sahil2](https://community.auth0.com/u/sahil2)\
**Post date:** [March 12, 2024, 4:15pm UTC](https://community.auth0.com/t/audiences-in-jwt-are-not-allowed/129532/1 "2024-03-12T16:15:02Z")

</div>

I am trying to follow the Client Credentials flow. I am able to get an access token using

```auto
curl --request POST \
  --url <domain>/oauth/token \
  --header 'content-type: application/json' \
  --data '{"client_id":"<client_id>","client_secret":"<client_secret>","audience":"<domain>/api/v2/","grant_type":"client_credentials"}'

```

When I try to use the generated Access Token, I get 403 Audiences in Jwt are not allowed

Question: Why does the generated access\_token has `aud` claim set to `<domain>/api/v2` instead of the client\_id? The usual behaviour that we see when using a UI application.

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [March 12, 2024, 9:51pm UTC](https://community.auth0.com/t/audiences-in-jwt-are-not-allowed/129532/3 "2024-03-12T21:51:05Z")

</div>

Hey there @sahil2 welcome to the community!

> [@sahil2](#):
>
> Question: Why does the generated access\_token has `aud` claim set to `<domain>/api/v2` instead of the client\_id? The usual behaviour that we see when using a UI application.

How exactly are you attempting to use this access token? The audience of `<domain>/api/v2` is specifically used to get [Management API access tokens](https://auth0.com/docs/secure/tokens/access-tokens/get-management-api-access-tokens-for-production#get-access-tokens). The audience claim will always be an API identifier, either your own [registered API](https://auth0.com/docs/get-started/auth0-overview/set-up-apis) or the Management API.

---

<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:** [March 26, 2024, 9:51pm UTC](https://community.auth0.com/t/audiences-in-jwt-are-not-allowed/129532/4 "2024-03-26T21:51:39Z")

</div>

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