Directus (DrWade) icon

Directus (DrWade)

Consume Directus API

Users → Accept User Invite

AI-generated

Overview

The Accept User Invite operation for the "Users" resource in this n8n node allows a user to accept an invitation to join a Directus instance. This is typically used in workflows where new users are invited to a Directus project and need to set their password and activate their account using a token they received (usually via email).

Common scenarios:

  • Automating onboarding processes for new users.
  • Integrating external signup flows with Directus user management.
  • Handling invite acceptance as part of a larger workflow, such as after approval or verification steps.

Practical example:
A company invites a new employee to its Directus-powered portal. The employee receives an email with an invite token. Using this node, the workflow can programmatically accept the invite by providing the token and the desired password, activating the user's account.


Properties

Name Type Meaning
Password String Password of the user. Used to set the initial password when accepting the invite.
Token String Accept invite token. Unique code sent to the user to validate and accept the invitation.

Output

The output will be a JSON object containing the result of the invite acceptance. The structure typically includes information about the newly activated user or a success confirmation. If there is an error, the output may contain an error field with the error message.

Example output:

{
  "id": "user_id",
  "email": "user@example.com",
  "status": "active",
  // ...other user fields
}

Or, in case of error:

{
  "error": "Invalid or expired token"
}

Dependencies

  • Directus API: Requires access to a Directus instance's API endpoint.
  • API Credentials: The node must be configured with valid Directus API credentials (directusApi).
  • Invite Token: The user must have received a valid invite token from Directus.

Troubleshooting

Common issues:

  • Invalid or Expired Token: If the provided token is invalid or has expired, the API will return an error. Ensure the token is copied correctly and is still valid.
  • Password Policy Violations: If the password does not meet Directus's requirements (e.g., minimum length, complexity), the request will fail.
  • Missing Required Fields: Both "Password" and "Token" are required. Omitting either will result in an error.

Error messages and resolutions:

  • "Invalid or expired token": Check that the token is correct and has not been used or expired.
  • "Password does not meet requirements": Use a stronger password that complies with Directus's password policy.
  • "Missing required property": Ensure both "Password" and "Token" are provided.

Links and References

Discussion