# Revoke a refresh token or an access token (RFC 7009)

POST`/oauth/revoke`

Request

**curl**


```bash
curl -X POST "https://tasksmate-fdfsarhnf5gacfb7.eastus-01.azurewebsites.net/oauth/revoke" \
  --data-urlencode "token=<token>"
```

Response 200

```json
{}
```

Revoke a refresh token (its whole family and the connection’s access tokens) or an access token (RFC 7009).

## Request Bodyrequired

application/x-www-form-urlencoded

_RevokeRequest_object

**token**

required

A refresh token (`tmr_…`) or an access token (`tm_live_…`)

string

**token\_type\_hint**

string

Allowed values: refresh\_token access\_token

**client\_id**

Required for a public app; a confidential app may send it with `client_secret` instead of HTTP Basic

string

**client\_secret**

`client_secret_post` (or use HTTP Basic)

string

## Responses

### 200

Revoked, or nothing to revoke (always 200 for a known app)

application/json

object

Example

```json
{}
```

### 400

An OAuth error (`invalid_request`, `invalid_grant`, `invalid_scope`, `unsupported_grant_type`)

application/json

_OAuthErrorBody_

A `OAuthErrorBody` object.

object

**error**

required

_Error_

Invalid\_request · invalid\_client · invalid\_grant · unauthorized\_client · unsupported\_grant\_type · invalid\_scope

string

**error\_description**

Any of:

**string**


string

**null**


null

Example

```json
{
  "error": "invalid_grant",
  "error_description": "string"
}
```

### 401

Client authentication failed (`invalid_client`)

application/json

_OAuthErrorBody_

A `OAuthErrorBody` object.

object

**error**

required

_Error_

Invalid\_request · invalid\_client · invalid\_grant · unauthorized\_client · unsupported\_grant\_type · invalid\_scope

string

**error\_description**

Any of:

**string**


string

**null**


null

Example

```json
{
  "error": "invalid_grant",
  "error_description": "string"
}
```

---
Source: https://developers.tasksmate.indrasol.com/reference/operations/oauthrevoke/
