# Clear User Session - Oauth tokens can not be revoked

**URL:** <https://devforum.okta.com/t/clear-user-session-oauth-tokens-can-not-be-revoked/828>\
**Category:** OAuth/OIDC\
**Tags:** api\
**Created:** [November 30, 2017, 11:58pm UTC](https://devforum.okta.com/t/clear-user-session-oauth-tokens-can-not-be-revoked/828 "2017-11-30T23:58:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![erwang732](https://avatars.discourse-cdn.com/v4/letter/e/2bfe46/32.png) [@erwang732](https://devforum.okta.com/u/erwang732)\
**Post date:** [November 30, 2017, 11:58pm UTC](https://devforum.okta.com/t/clear-user-session-oauth-tokens-can-not-be-revoked/828/1 "2017-11-30T23:58:17Z")

</div>

Hi,

I am trying to use Users Sessions api ( /api/v1/users/:uid/sessions) to clear all the sessions of user and revoke Oauth tokens at the same time.

The problem is that user’s sessions are destroyed but the Oauth tokens are not revoked.

This api is described here in the documentation:

> **[Users | Okta Developer](https://developer.okta.com/docs/reference/api/users/)**
>
> Secure, scalable, and highly available authentication and user management for any app.

The request headers are like this:

DELETE /api/v1/users/{uid}/sessions/?oauthTokens=true HTTP/1.1  
Host: [myorg.oktapreview.com](http://myorg.oktapreview.com)  
Accept: application/json  
Content-Type: multipart/form-data;  
Authorization: SSWS {apiKey}  
Cache-Control: no-cache  
Postman-Token: 4c331971-08bd-e696-c55f-835d3833d9fb

Do you guys have any idea about this?

Thanks a lot!

---

<div class="post-metadata">

**Author:** ![tom](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/tom/32/24_2.png) [@tom](https://devforum.okta.com/u/tom)\
**Post date:** [December 1, 2017, 9:47pm UTC](https://devforum.okta.com/t/clear-user-session-oauth-tokens-can-not-be-revoked/828/2 "2017-12-01T21:47:50Z")

</div>

Hmm, how are you verifying that the user’s tokens are revoked? Are you using the token introspection endpoint? Or using a JWT verifier library?

---

<div class="post-metadata">

**Author:** ![erwang732](https://avatars.discourse-cdn.com/v4/letter/e/2bfe46/32.png) [@erwang732](https://devforum.okta.com/u/erwang732)\
**Post date:** [December 1, 2017, 11:20pm UTC](https://devforum.okta.com/t/clear-user-session-oauth-tokens-can-not-be-revoked/828/3 "2017-12-01T23:20:45Z")

</div>

I am using Okta’s introspection endpoint.

---

<div class="post-metadata">

**Author:** ![tom](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/tom/32/24_2.png) [@tom](https://devforum.okta.com/u/tom)\
**Post date:** [December 4, 2017, 3:36pm UTC](https://devforum.okta.com/t/clear-user-session-oauth-tokens-can-not-be-revoked/828/4 "2017-12-04T15:36:15Z")

</div>

What response are you getting back from the introspection endpoint? Just want to make sure I’m not missing anything here.

---

<div class="post-metadata">

**Author:** ![erwang732](https://avatars.discourse-cdn.com/v4/letter/e/2bfe46/32.png) [@erwang732](https://devforum.okta.com/u/erwang732)\
**Post date:** [December 4, 2017, 6:42pm UTC](https://devforum.okta.com/t/clear-user-session-oauth-tokens-can-not-be-revoked/828/5 "2017-12-04T18:42:28Z")

</div>

The response is 204 No Content. After I called the introspection endpoint, user’s sessions were destroyed but the OAuth tokens were not revoked.

---

<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 12, 2024, 9:25pm UTC](https://devforum.okta.com/t/clear-user-session-oauth-tokens-can-not-be-revoked/828/6 "2024-01-12T21:25:23Z")

</div>

Closed on January 12, 2024, 9:25pm UTC


