TwentyDEV icon

TwentyDEV

Consume the Twenty API

Actions252

Overview

This node operation, Find Api Key Duplicates, is designed to identify duplicate API keys based on provided data. It allows users to submit a list of API key objects and optionally specify which keys (by IDs) to check against. The node then returns information about duplicates found, including nested related objects up to a specified depth.

Common scenarios:

  • Cleaning up API key management by detecting and removing duplicate keys.
  • Auditing API keys in an organization to ensure uniqueness.
  • Integrating with systems that require validation of API key uniqueness before creation or update.

Practical example:
You have a list of API keys with their expiration dates and names, and you want to find if any of these keys already exist in your system to avoid duplication. You provide this list as input, set the desired depth for related object details, and receive a structured response highlighting duplicates.

Properties

Name Meaning
Depth Determines how much related object information to include in the response:
- 0: Only primary API key information.
- 1: Primary API key plus directly related objects.
- 2: Primary, directly related, and related objects of those related objects.
Data JSON array of API key objects to check for duplicates. Each object can include properties like expiresAt (expiration date) and name (API key name).
Ids JSON array of API key IDs to specifically check for duplicates. Can be used to limit the scope of the duplicate search.

Output

The output is a JSON structure containing information about the found duplicate API keys. Depending on the Depth property, the response includes nested related objects:

  • At depth 0, only the primary API key data is returned.
  • At depth 1, the primary API key data plus its directly related objects are included.
  • At depth 2, the response also contains related objects of those related objects, providing a more comprehensive view.

If the node supports binary data output, it would typically represent attachments or files related to the API keys, but no such binary output is indicated here.

Dependencies

  • Requires an API authentication token or API key credential to connect to the external Twenty API service.
  • The node uses the Twenty API base URL configured via credentials.
  • No additional environment variables are explicitly required beyond standard API authentication setup.

Troubleshooting

  • Invalid JSON in Data or Ids: If the JSON input for Data or Ids is malformed, the node will fail. Ensure valid JSON formatting.
  • Authentication errors: Missing or invalid API credentials will cause authentication failures. Verify that the API key or token is correctly configured.
  • Depth value out of range: Using a depth value other than 0, 1, or 2 may result in unexpected behavior or errors. Use only the supported options.
  • Empty or null inputs: Providing empty arrays or null values for Data or Ids might lead to no results or errors. Ensure meaningful input data is supplied.

Links and References

Discussion