GateKit icon

GateKit

Universal messaging gateway - send messages across multiple platforms

Actions26

Overview

This node operation allows you to create a new API key within a specified project. It is useful for generating access credentials that can be used to authenticate and authorize API requests to the GateKit platform. Typical use cases include automating the creation of API keys for different environments, services, or users, managing scoped access permissions, and setting expiration policies for security.

For example, you might use this node to programmatically generate an API key with specific scopes for a microservice that needs to interact with your messaging gateway, or to create temporary keys that expire after a certain number of days for limited-time integrations.

Properties

Name Meaning
API key name The name to assign to the new API key.
Comma-separated scopes A list of scopes (permissions) granted to the API key, separated by commas.
Expiration in days Optional number of days after which the API key will expire.
Project Slug Identifier of the project under which the API key will be created.

Output

The output JSON contains the response from the API after creating 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, and related metadata.

No binary data output is involved in this operation.

Dependencies

  • Requires an active connection to the GateKit API service.
  • Requires an API authentication token credential configured in n8n to authorize the request.
  • The node uses the base URL and headers defined by the user's credentials for the GateKit API.

Troubleshooting

  • Missing required fields: Ensure that the "API key name", "Comma-separated scopes", and "Project Slug" are provided; otherwise, the API will reject the request.
  • Invalid scopes: If the scopes string contains invalid or unsupported scopes, the API may return an error. Verify the allowed scopes with the GateKit documentation.
  • Expired or invalid credentials: Authentication failures occur if the API key credential used by the node is invalid or expired.
  • Project not found: If the specified project slug does not exist, the API will return an error indicating the project was not found.
  • Network issues: Connectivity problems between n8n and the GateKit API endpoint can cause timeouts or failed requests.

To resolve errors, verify all input parameters, check API credentials, and ensure network connectivity.

Links and References

Discussion