Actions26
Overview
This node provides integration with the GateKit API, a universal messaging gateway that supports multiple resources and operations related to projects, members, platforms, messages, API keys, and platform logs. Specifically, for the ApiKeys resource and the Roll operation, this node allows you to roll (rotate) an existing API key within a specified project. Rolling an API key means generating a new key while revoking the old one after 24 hours, enhancing security by periodically updating credentials.
Typical use cases include:
- Automating API key rotation to maintain security best practices.
- Managing API keys programmatically within CI/CD pipelines or administrative workflows.
- Integrating API key management into broader automation scenarios involving GateKit projects.
Example: You have an API key used in your application for accessing GateKit services. To improve security, you want to rotate this key regularly without downtime. Using this node's Roll operation, you can trigger the generation of a new key and schedule the old key's revocation automatically.
Properties
| Name | Meaning |
|---|---|
API key ID to roll (keyId) |
The identifier of the API key you want to roll (rotate). This is required. |
Project Slug (projectSlug) |
The unique identifier (slug) of the project where the API key exists. Required. |
KeyId (keyId) |
Duplicate property for the API key ID parameter; also required. |
Note: The keyId appears twice due to input definitions but represents the same required API key identifier.
Output
The node outputs the JSON response from the GateKit API corresponding to the rolled API key. This typically includes details about the newly generated API key and metadata about the rolling process. The output structure will contain fields such as the new key value, expiration, scopes, and status.
No binary data output is involved in this operation.
Dependencies
- Requires an active GateKit API credential configured in n8n with appropriate permissions.
- The node makes HTTP POST requests to the GateKit API endpoint
/api/v1/projects/{projectSlug}/keys/{keyId}/roll. - The user must provide valid
projectSlugandkeyIdparameters. - Network connectivity to the GateKit API service is necessary.
Troubleshooting
- Invalid API key ID or project slug: If the provided
keyIdorprojectSlugdoes not exist or is incorrect, the API will return an error. Verify these values carefully. - Insufficient permissions: The API key used for authentication must have rights to manage API keys in the specified project.
- Network errors: Ensure that the n8n instance has internet access and can reach the GateKit API URL.
- Duplicate
keyIdproperties: Although the input definition shows twokeyIdproperties, only one should be set correctly. Conflicting inputs may cause unexpected behavior. - API rate limits: Frequent rolling of keys might hit API rate limits; check GateKit API documentation for limits.
Links and References
- GateKit API Documentation (hypothetical link)
- Best practices for API key rotation: https://cheatsheetseries.owasp.org/cheatsheets/API_Security_Cheat_Sheet.html#key-rotation