h2oGPTe icon

h2oGPTe

h2oGPTe is an AI-powered search assistant for your internal teams to answer questions gleaned from large volumes of documents, websites and workplace content.

Actions198

Overview

This node operation allows administrators to create a new API key for a specified user within the system. It is useful in scenarios where an admin needs to programmatically generate API keys for users to enable them to authenticate and interact with the platform's API securely. For example, an admin can automate the provisioning of API keys when onboarding new users or integrate this functionality into a larger workflow that manages user access.

Properties

Name Meaning
User ID The unique identifier of the user for whom the API key will be created.
Additional Options Optional parameters to customize the API key creation:
- Name A descriptive name for the API key to help identify it.
- Collection ID The ID of a specific collection to which the API key should be scoped or configured.
- Expires In The duration or interval after which the API key should expire (e.g., "30 days").

Output

The output JSON contains the response from the API after creating the API key. This typically includes details about the newly created API key such as its identifier, associated user, expiration date, and any other metadata returned by the API. The node does not explicitly handle binary data output for this operation.

Dependencies

  • Requires an API authentication credential configured in n8n to authorize requests.
  • The base URL for the API is derived from the credential configuration.
  • The node sends a POST request to the /admin/api_keys endpoint to create the API key.

Troubleshooting

  • Missing or invalid User ID: The operation requires a valid user ID. Ensure the user ID is correct and the user exists.
  • Insufficient permissions: Only admins can create API keys for other users. Verify that the API credentials used have administrative privileges.
  • Invalid expiration format: The Expires In field must be a valid time interval string (e.g., "30 days"). Incorrect formats may cause errors.
  • API connectivity issues: Check network connectivity and API endpoint availability.
  • Error responses from API: Review error messages returned by the API for clues, such as duplicate key names or invalid collection IDs.

Links and References

  • Refer to your platform’s API documentation for detailed information on API key management endpoints.
  • Consult n8n documentation on how to configure API credentials and use HTTP request nodes if needed.

Discussion