> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sagescreen.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Revoke all tokens for the authenticated user

> Deletes **all** stored token records for the user identified by
the provided JWT. Effectively logs the user out of the API.

Note: this is a GET endpoint for legacy reasons.
WordPress session cookies are **not** cleared — use the
`sagescreen_logout` AJAX handler for full logout.

**Public endpoint.**




## OpenAPI

````yaml /openapi/private/specs/wp/auth.yml get /auth/revoke
openapi: 3.1.0
info:
  title: SageScreen — Auth Module
  description: >
    Authentication and session management. Handles JWT token lifecycle

    (issue, refresh, validate, revoke) and WordPress-based login/logout

    with reCAPTCHA/Turnstile protection.


    Uses RS256-signed JWTs stored in the `wp_sage_screen_jwt` table.

    Tokens have a configurable TTL (`sage_screen_jwt_expires`, default 3600 s)

    and a separate refresh window (`sage_screen_jwt_refresh_expires`, default
    604800 s / 7 days).
  version: 1.0.0
servers:
  - url: https://{domain}/wp-json/sagescreen/v1
    description: WordPress REST API
    variables:
      domain:
        default: api.sagescreen.app
security: []
tags:
  - name: Auth – REST
    description: JWT token endpoints (REST API)
  - name: Auth – AJAX
    description: Session-based login / logout / password flows (AJAX)
paths:
  /auth/revoke:
    get:
      tags:
        - Auth – REST
      summary: Revoke all tokens for the authenticated user
      description: |
        Deletes **all** stored token records for the user identified by
        the provided JWT. Effectively logs the user out of the API.

        Note: this is a GET endpoint for legacy reasons.
        WordPress session cookies are **not** cleared — use the
        `sagescreen_logout` AJAX handler for full logout.

        **Public endpoint.**
      operationId: authRevokeToken
      parameters:
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
            examples:
              - Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...
          description: Bearer {token}
      responses:
        '200':
          description: All tokens revoked
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RevokeTokenResponse'
              example:
                revoked: true
        '401':
          description: Token missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPError'
              examples:
                missingToken:
                  summary: No Authorization header
                  value:
                    code: missing_token
                    message: Authorization header with Bearer token required
                    data:
                      status: 401
                invalidToken:
                  summary: Token cannot be decoded
                  value:
                    code: invalid_token
                    message: Invalid token
                    data:
                      status: 401
        '500':
          description: Revocation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPError'
              example:
                code: revocation_failed
                message: Failed to revoke token
                data:
                  status: 500
      security: []
components:
  schemas:
    RevokeTokenResponse:
      type: object
      required:
        - revoked
      properties:
        revoked:
          type: boolean
          const: true
          examples:
            - true
    WPError:
      type: object
      description: Standard WordPress REST API error envelope
      required:
        - code
        - message
        - data
      properties:
        code:
          type: string
          description: Machine-readable error code
          examples:
            - missing_credentials
        message:
          type: string
          description: Human-readable error message
          examples:
            - Username and password are required
        data:
          type: object
          required:
            - status
          properties:
            status:
              type: integer
              description: HTTP status code
              examples:
                - 400

````