Directus (DrWade) icon

Directus (DrWade)

Consume Directus API

Overview

The "Utilities: Verify Hash" operation in this n8n node is designed to verify whether a given string matches a provided hash using the Directus API. This is useful for scenarios where you need to confirm the integrity or authenticity of data, such as password verification, token validation, or checking if a file or message has been tampered with.

Practical examples:

  • Verifying user passwords during authentication flows.
  • Checking if a received webhook payload matches an expected hash.
  • Validating tokens or codes sent to users.

Properties

Name Type Meaning
String String The source string to be verified.
Hash String The hash value to verify against.

Output

The output will be a JSON object with the result of the verification. The structure can vary depending on the response from the Directus API, but typically:

{
  "result": true // or false
}
  • If the verification is successful, "result" will be true.
  • If not, "result" will be false.
  • In case of errors, the output may include an "error" field with the error message.

Dependencies

  • Directus API: Requires access to a running Directus instance.
  • API Credentials: You must configure the directusApi credentials in n8n for authentication.

Troubleshooting

Common issues:

  • Invalid Credentials: If the Directus API credentials are incorrect or missing, the node will fail to connect.
  • Malformed Input: If the string or hash fields are empty or improperly formatted, the API may return an error.
  • API Errors: Any network or server-side issues with Directus will result in error messages.

Error messages and resolutions:

  • "Missing required parameter": Ensure both "String" and "Hash" fields are filled.
  • "Invalid hash format": Check that the hash provided matches the expected format used by Directus.
  • "Authentication failed": Re-check your Directus API credentials in n8n.

Links and References

Discussion