Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node operation deletes a specific OAuth 2 token associated with a user in the system. It is useful when you want to revoke or remove an OAuth 2 application token that was previously issued, for example, to invalidate access or refresh tokens for security reasons or to manage active sessions.

Practical examples include:

  • Revoking a user's OAuth 2 token after they log out from an external application.
  • Cleaning up expired or unused OAuth 2 tokens programmatically.
  • Managing user access by deleting tokens related to specific OAuth 2 applications.

Properties

Name Meaning
Id The numeric identifier of the OAuth 2 token to be deleted. This is required to specify which token should be removed.

Output

The output JSON will typically confirm the deletion of the specified OAuth 2 token. It may contain status information or an empty response indicating success. There is no binary data output expected from this operation.

Dependencies

  • Requires an API key credential to authenticate requests against the Gitea API.
  • The node interacts with the Gitea API endpoint configured via credentials, specifically targeting the /api/v1 base URL.
  • Proper permissions are needed on the API key to delete OAuth 2 tokens.

Troubleshooting

  • Invalid or missing token ID: Ensure the Id property is provided and corresponds to an existing OAuth 2 token.
  • Authentication errors: Verify that the API key credential is valid and has sufficient permissions to delete OAuth 2 tokens.
  • API endpoint issues: Confirm the base URL in credentials is correct and the Gitea server is reachable.
  • Permission denied: The authenticated user might lack rights to delete tokens; check user roles and permissions.

Common error messages might include:

  • "Token not found" if the specified ID does not exist.
  • "Unauthorized" or "Forbidden" if authentication fails or permissions are insufficient.

Links and References

Discussion