---
agentTools:
  projectIndex: https://squadrun.readme.io/llms.txt
---

# /oauth/revoke_token/

Endpoint to revoke an active oauth token

Use this API endpoint to revoke an active oauth token.

[block:callout]
{
  "type": "warning",
  "body": "`/oauth/revoke_token/` endpoint accepts data as a POST form and not a json dump unlike rest of the APIs below",
  "title": "Please note"
}
[/block]

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Authentication API",
    "version": "2.0"
  },
  "servers": [
    {
      "url": "https://api.classifyit.co"
    }
  ],
  "security": [
    {}
  ],
  "paths": {
    "/oauth/revoke_token/": {
      "post": {
        "summary": "/oauth/revoke_token/",
        "description": "Endpoint to revoke an active oauth token",
        "operationId": "oauthrevoke_token",
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Auth token generated previously that needs to be invalidated"
                  },
                  "client_id": {
                    "type": "string",
                    "description": "Client ID used to generate the token"
                  },
                  "client_secret": {
                    "type": "string",
                    "description": "Client secret"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": ""
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"error_description\": \"Missing token parameter.\",\n    \"error\": \"invalid_request\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error_description": {
                      "type": "string",
                      "example": "Missing token parameter."
                    },
                    "error": {
                      "type": "string",
                      "example": "invalid_request"
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "curl",
              "code": "curl --data \"token=YOUR_TOKEN&client_id=test_client_id&client_secret=test_client_secret\" https://api.classifyit.co/oauth/revoke_token/"
            },
            {
              "language": "python",
              "code": "import requests\n\nurl = \"https://api.classifyit.co/oauth/token/\"\npayload = {\n  \"client_id\": \"test_client_id\", \n  \"client_secret\": \"test_client_secret\", \n  \"token\t\": \"YOUR_TOKEN\"\n}\n\nresponse = requests.post(url, payload)\nresponse.json()"
            }
          ],
          "samples-languages": [
            "curl",
            "python"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "6305417f9807941f67a9333f:5b0e6faab7156300039cbcc4"
}
```