# Generated JWT token is invalid

**URL:** <https://community.auth0.com/t/generated-jwt-token-is-invalid/97699>\
**Category:** Get Help\
**Tags:** keys, management-api\
**Created:** [January 7, 2023, 5:51pm UTC](https://community.auth0.com/t/generated-jwt-token-is-invalid/97699 "2023-01-07T17:51:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![KSADeBiekorf](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ksadebiekorf/32/42391_2.png) [@KSADeBiekorf](https://community.auth0.com/u/KSADeBiekorf)\
**Post date:** [January 7, 2023, 5:51pm UTC](https://community.auth0.com/t/generated-jwt-token-is-invalid/97699/1 "2023-01-07T17:51:06Z")

</div>

I’m generating a JWT token using the following:

```plaintext
tcurl --request POST \
  --url 'https://dev-tce1ggxc6lqxphjc.eu.auth0.com/oauth/token' \
  --header 'content-type: application/x-www-form-urlencoded' \
  --data grant_type=client_credentials \
  --data client_id=MY_CLIENT_ID \
  --data client_secret=MY_CLIENT_SECRET \
  --data audience=MY_API_AUDIENCE

```

When I paste this into [jwt.io/](https://jwt.io/), I get `invalid signature`.

---

<div class="post-metadata">

**Author:** ![eric.culley](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/eric.culley/32/37008_2.png) [@eric.culley](https://community.auth0.com/u/eric.culley)\
**Post date:** [January 12, 2023, 11:58pm UTC](https://community.auth0.com/t/generated-jwt-token-is-invalid/97699/3 "2023-01-12T23:58:20Z")

</div>

Hi @KSADeBiekorf

Welcome to the Auth0 Community.

You may be receiving an opaque access token, which is not formatted as a JWT and would throw this error when pasted into [jwt.io](http://jwt.io). An easy way to determine if you’re dealing with an opaque token is if you see two consecutive periods (`..`) in the string that’s returned.

Generally, opaque access tokens are returned when no `audience` is specified. Although, since it appears you are passing an `audience` value, this may indicate a misconfiguration of your API. Ensure that you’ve authorized your application (MY\_CLIENT\_ID) to receive an access token from the API under the **Machine to Machine Applications** tab of it’s settings and that your passing the value of it’s unique **Identifier** in your request.

[https://auth0.com/docs/secure/tokens/access-tokens#opaque-access-tokens](https://auth0.com/docs/secure/tokens/access-tokens#opaque-access-tokens)

> **[API Settings](https://auth0.com/docs/get-started/apis/api-settings)**
>
> Describes the settings related to APIs available in the Auth0 Dashboard.

---

<div class="post-metadata">

**Author:** ![eric.culley](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/eric.culley/32/37008_2.png) [@eric.culley](https://community.auth0.com/u/eric.culley)\
**Post date:** [January 23, 2023, 3:00pm UTC](https://community.auth0.com/t/generated-jwt-token-is-invalid/97699/4 "2023-01-23T15:00:08Z")

</div>

This topic was automatically closed after 9 days. New replies are no longer allowed.
