# "Invalid value for 'client\_id' parameter." On logout

**URL:** <https://devforum.okta.com/t/invalid-value-for-client-id-parameter-on-logout/13574>\
**Category:** Questions\
**Created:** [March 30, 2021, 9:49pm UTC](https://devforum.okta.com/t/invalid-value-for-client-id-parameter-on-logout/13574 "2021-03-30T21:49:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![BirdThunderford](https://avatars.discourse-cdn.com/v4/letter/b/e9c0ed/32.png) [@BirdThunderford](https://devforum.okta.com/u/BirdThunderford)\
**Post date:** [March 30, 2021, 9:49pm UTC](https://devforum.okta.com/t/invalid-value-for-client-id-parameter-on-logout/13574/1 "2021-03-30T21:49:32Z")

</div>

Hello!

I’m using Django with mozilla-django-oidc to handle my openid connect authentication. This module allows me to specify a custom logout mechanism and I’m running into an issue where it throws a 400 Bad Request error when I try to use the custom logout url.

The URL looks like:

```
https://<my okta org>/oauth2/default/v1/logout?id_token_hint=<my csrf token>&post_logout_redirect_uri=<my post logout url>

```

Only this causes the 400 Bad Request error and throws up this error data:

```
|errorCode|invalid_client|
|---|---|
|errorSummary|Invalid value for 'client_id' parameter.|
|errorLink|invalid_client|
|errorId|oaeSst18EBASayc_PcZ4ibbBQ|
|errorCauses|[]|

```

What does the client id have to do with the logout URL? It’s not something that changes during the session at all (and I wouldn’t even be able to log in if the client id were incorrect anyway).

Any thoughts?

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [March 30, 2021, 11:35pm UTC](https://devforum.okta.com/t/invalid-value-for-client-id-parameter-on-logout/13574/2 "2021-03-30T23:35:38Z")

</div>

Are you sending the raw jwt ID Token as the id\_token\_hint in your /logout redirect?

That error usually crops up if the id token, which is the auth for this request, is missing or malformed.

---

<div class="post-metadata">

**Author:** ![BirdThunderford](https://avatars.discourse-cdn.com/v4/letter/b/e9c0ed/32.png) [@BirdThunderford](https://devforum.okta.com/u/BirdThunderford)\
**Post date:** [March 30, 2021, 11:49pm UTC](https://devforum.okta.com/t/invalid-value-for-client-id-parameter-on-logout/13574/3 "2021-03-30T23:49:40Z")

</div>

Turns out I was not! I realized it just as I got your response. I was passing it the csrf token by accident. whoops.

Thanks!

---

<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:** [March 31, 2021, 11:50pm UTC](https://devforum.okta.com/t/invalid-value-for-client-id-parameter-on-logout/13574/4 "2021-03-31T23:50:12Z")

</div>

Closed on March 31, 2021, 11:50pm UTC

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