# Error invalid\_client when hitting logout url

**URL:** <https://devforum.okta.com/t/error-invalid-client-when-hitting-logout-url/23416>\
**Category:** OAuth/OIDC\
**Created:** [February 22, 2023, 8:13am UTC](https://devforum.okta.com/t/error-invalid-client-when-hitting-logout-url/23416 "2023-02-22T08:13:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![akashs1408](https://avatars.discourse-cdn.com/v4/letter/a/ac91a4/32.png) [@akashs1408](https://devforum.okta.com/u/akashs1408)\
**Post date:** [February 22, 2023, 8:13am UTC](https://devforum.okta.com/t/error-invalid-client-when-hitting-logout-url/23416/1 "2023-02-22T08:13:28Z")

</div>

Hello everyone,

I have created a new App in Okta. The users can login on my website with Okta App. The issue is when a user is logout from my website then I want to redirect the user to login page of Okta and for this, I have to logout the app session from Okta.

In the documentation, it is mentioned to hit the logout url like below:  
https://{issuerUrl}/oauth2/default/v1/logout. If I hit this url it always return me below error:

“errorCode”:“invalid\_client”,“errorSummary”:“A client\_id must be provided in the request.”

I have passed client\_id in the request but I am still facing the same issue.

Can anyone help me ? because I have spend 2 hours on this and did not get any solution ?

---

<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:** [February 22, 2023, 4:49pm UTC](https://devforum.okta.com/t/error-invalid-client-when-hitting-logout-url/23416/2 "2023-02-22T16:49:41Z")

</div>

You do not send the client\_id in this request, you instead send a `id_token_hint` URL parameter, the value being the raw ID token issued to the user for this application. Don’t forget that this must be a redirect!

This is also discussed in our [documentation for this endpoint](https://developer.okta.com/docs/reference/api/oidc/#logout), I definitely recommend reviewing our API docs if you’re unfamiliar with OIDC and how to interact with each endpoint.

---

<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:** [January 3, 2024, 6:39pm UTC](https://devforum.okta.com/t/error-invalid-client-when-hitting-logout-url/23416/3 "2024-01-03T18:39:57Z")

</div>

Closed on January 3, 2024, 6:39pm UTC


