GateKit icon

GateKit

Universal messaging gateway - send messages across multiple platforms

Overview

This node allows you to create a new API key within a specified project in the GateKit platform. It is useful for automating the generation of API keys that can be used to authenticate and authorize access to various services or resources managed under a project. Typical use cases include programmatically provisioning API keys for different environments, users, or services without manual intervention.

For example, you might use this node to generate an API key with specific scopes for a microservice that needs limited access, or to create temporary API keys that expire after a certain number of days.

Properties

Name Meaning
API key name The name to assign to the new API key.
Comma-separated scopes A comma-separated list of scopes (permissions) that the API key will have.
Expiration in days Optional number of days after which the API key will expire.
Project Identifier of the project where the API key will be created.

Output

The output JSON contains the response from the API call to create the API key. This typically includes details about the newly generated API key such as its identifier, the key string itself, assigned scopes, expiration date if set, and metadata related to the key.

No binary data output is involved in this operation.

Dependencies

  • Requires an API authentication token credential configured in n8n to authorize requests to the GateKit API.
  • The node sends a POST request to the endpoint /api/v1/projects/{project}/keys with query parameters for the API key creation.
  • The project parameter must correspond to an existing project in the GateKit system.

Troubleshooting

  • Missing required fields: Ensure that the API key name, scopes, and project are provided; these are mandatory.
  • Invalid scopes: The scopes must be valid and recognized by the GateKit API; invalid scopes may cause errors.
  • Expired or invalid credentials: Authentication failures indicate issues with the API key credential used in n8n.
  • Project not found: If the specified project does not exist, the API will return an error.
  • API rate limits or network issues: Temporary failures may occur due to network problems or API rate limiting.

To resolve errors, verify all input parameters, ensure correct API credentials, and check the project existence and permissions.

Links and References

Discussion