# The client\_assertion\_type is invalid

**URL:** <https://devforum.okta.com/t/the-client-assertion-type-is-invalid/12717>\
**Category:** Questions\
**Created:** [February 1, 2021, 1:14am UTC](https://devforum.okta.com/t/the-client-assertion-type-is-invalid/12717 "2021-02-01T01:14:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ariel.mendoza](https://avatars.discourse-cdn.com/v4/letter/a/9d8465/32.png) [@ariel.mendoza](https://devforum.okta.com/u/ariel.mendoza)\
**Post date:** [February 1, 2021, 1:14am UTC](https://devforum.okta.com/t/the-client-assertion-type-is-invalid/12717/1 "2021-02-01T01:14:58Z")

</div>

I’m following [Get an access token | Okta Developer](https://developer.okta.com/docs/guides/implement-oauth-for-okta-serviceapp/get-access-token/) and have completed the below steps successfully:

1. Generated JSON Web Key Pairs Sets
2. Previous generated keys have been used to create a service thru the API
3. Access granted to okta.users.read scope
4. JWT string has been signed

and after that I’m getting the below error which says client\_assertion\_type is invalid

```
~ curl -X POST "https://dev-76039829.okta.com/oauth2/default/v1/token" \
    -H "Accept: application/json" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials \
&scope=okta.users.read \
&client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer \
&client_assertion=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.......CsJGaHPEAP_iTitdeeBzi7uA4fluLZHJGVRWSn-JLEg"

{"error":"invalid_client","error_description":"The client_assertion_type is invalid."}%

```

I have checked the allowed client\_assertion\_type types, and looks correct, the only issue I noticed is that the Application the moment is created thru API doesn’t get a client secret assigned

Does anybody has any clue about what could be wrong?

---

<div class="post-metadata">

**Author:** ![vijet](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/vijet/32/245_2.png) [@vijet](https://devforum.okta.com/u/vijet)\
**Post date:** [February 1, 2021, 7:29am UTC](https://devforum.okta.com/t/the-client-assertion-type-is-invalid/12717/2 "2021-02-01T07:29:14Z")

</div>

Hi @ariel.mendoza,

If you’re following this guide to `Implement OAuth For Okta`, you should be calling [https://dev-76039829.okta.com/oauth2/v1/token](https://dev-76039829.okta.com/oauth2/v1/token) instead of [https://dev-76039829.okta.com/oauth2/default/v1/token](https://dev-76039829.okta.com/oauth2/default/v1/token) (Remove `default` from the token URI)  
Let us know if that works.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/oktadev/original/1X/589c4c5f80de422d01f47cee7185a7fb8227835c.png) [@system](https://devforum.okta.com/u/system)\
**Post date:** [January 26, 2024, 6:29pm UTC](https://devforum.okta.com/t/the-client-assertion-type-is-invalid/12717/3 "2024-01-26T18:29:16Z")

</div>

Closed on January 26, 2024, 6:29pm UTC

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