Actions51
- Platforms Actions
- Projects Actions
- Webhooks Actions
- ApiKeys Actions
- Auth Actions
- Identities Actions
- Members Actions
- Messages Actions
- Platform Logs Actions
Overview
This node provides integration with a universal messaging gateway platform, allowing users to manage API keys among other resources. Specifically, the "Roll" operation under the "ApiKeys" resource enables users to roll an existing API key. Rolling an API key means generating a new key while revoking the old one after 24 hours. This is useful for maintaining security by periodically rotating API keys without immediate disruption of service.
Common scenarios include:
- Automatically rotating API keys to comply with security policies.
- Minimizing downtime by allowing a grace period before the old key is revoked.
- Managing API keys programmatically within workflows that require secure access to the messaging gateway.
Example use case:
- A workflow triggers the rolling of an API key every 30 days to ensure keys are regularly updated without manual intervention.
Properties
| Name | Meaning |
|---|---|
| keyId | The identifier of the API key to roll (i.e., generate a new key and revoke the old one). |
| project | The project identifier on which the API key operation will be performed. |
Output
The output of this operation is the JSON response from the API endpoint that performs the key rolling. It typically includes details about the newly generated API key and possibly metadata about the old key's revocation schedule.
No binary data output is involved in this operation.
Dependencies
- Requires an API key credential for authenticating requests to the messaging gateway API.
- The node expects the base URL and authentication credentials to be configured in n8n credentials for the messaging gateway.
- The API endpoint used is:
POST /api/v1/projects/{project}/keys/{keyId}/roll
Troubleshooting
- Invalid or missing keyId: Ensure the
keyIdproperty is correctly set to an existing API key ID within the specified project. - Unauthorized errors: Verify that the API key credential used has sufficient permissions to roll keys in the target project.
- Project not found: Confirm the
projectidentifier is correct and accessible by the authenticated user. - API rate limits: If rolling keys frequently, watch for rate limit errors from the API and space out requests accordingly.
Links and References
- Refer to the messaging gateway API documentation for detailed information on API key management and rolling keys.
- Security best practices for API key rotation: https://owasp.org/www-community/vulnerabilities/Using_Components_with_Known_Vulnerabilities