NAppwrite icon

NAppwrite

Use Appwrite's API from inside N8N, updated by @ZachHandley

Overview

This node integrates with the Appwrite API to manage user-related operations. Specifically, for the "Users" resource and the "Delete User Sessions" operation, it deletes all active sessions associated with a specified user ID. This is useful in scenarios where you want to forcibly log out a user from all devices or sessions, such as after a security breach, password reset, or account deactivation.

Practical examples:

  • Automatically logging out a user from all devices after they change their password.
  • Revoking access for a user who has been suspended or deleted.
  • Clearing sessions during maintenance or compliance checks.

Properties

Name Meaning
User ID The unique identifier of the user whose sessions will be deleted.

Output

The output JSON contains a single object with a success field indicating whether the deletion of all user sessions was successful (true or false). The structure looks like:

[
  {
    "success": true
  }
]

There is no binary data output for this operation.

Dependencies

  • Requires an active connection to the Appwrite backend via an API key credential.
  • The node depends on the Appwrite SDK client configured with the project URL, project ID, and API key.
  • Proper permissions must be granted to the API key to manage user sessions.

Troubleshooting

  • Common issues:

    • Invalid or missing User ID parameter will cause the operation to fail.
    • Insufficient permissions on the API key may result in authorization errors.
    • Network connectivity problems can prevent communication with the Appwrite server.
  • Error messages:

    • Errors related to "Resource not found" indicate that the specified user or sessions do not exist.
    • Authorization errors suggest the API key lacks required scopes or is invalid.
    • Timeout or network errors imply connectivity issues; verify endpoint URL and network status.

To resolve these:

  • Ensure the User ID is correct and exists in the Appwrite project.
  • Verify the API key credentials have session management permissions.
  • Check network connectivity and Appwrite server availability.

Links and References

Discussion