OAuth Provider

Revoke an access or refresh token

Changed on

OAuth 2.0 Token Revocation Endpoint (RFC 7009).

Revokes an access token or refresh token, preventing further use. Revoking a refresh token also invalidates associated access tokens.

Use Cases:

  • User logs out of third-party app
  • User revokes app access from account settings
  • Security incident response

Note: Returns 200 OK even if token was already revoked or invalid (per RFC 7009, to prevent token enumeration).

post/oauth2/revoke

Request

  • Base URL
    https://app.pipeshub.com/api/v1
  • URL
    https://app.pipeshub.com/api/v1/oauth2/revoke
  • Auth
    none required

Request body

tokenstring required

The token to revoke

token_type_hint'access_token' | 'refresh_token'

Hint about token type (optional, improves performance)

client_idstring required

Client ID

client_secretstring

Client secret. Required for a confidential client (missing or empty: 401 invalid_client); a public client, such as the first-party device app, is identified by client_id alone. A wrong secret is 401 invalid_client.

Response

Token revoked, or it was unknown, already revoked or issued to another client. No body.

Changes

    • breaking

      the request property's minLength was increased from 0 to 1 (media type: application/x-www-form-urlencoded)

    • breaking

      the request property's minLength was increased from 0 to 1 (media type: application/json)

    • breaking

      the request property's minLength was increased from 0 to 1 (media type: application/x-www-form-urlencoded)

    • breaking

      the request property's minLength was increased from 0 to 1 (media type: application/json)

    • warning

      added the new authorization_pending enum value to the response property for the response status

    • warning

      added the new expired_token enum value to the response property for the response status

    • warning

      added the new slow_down enum value to the response property for the response status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • warning

      added the new invalid_target enum value to the response property for the response status