Lectful Central icon

Lectful Central

Interact with the Lectful Central API for admin operations

Overview

This node interacts with the Lectful Central API to perform administrative operations related to tenant management, among other resources. Specifically, the Generate Tenant Token operation allows you to generate an authentication token for a specific tenant by providing the tenant's ID and admin user credentials (email and password). This token can be used to authenticate subsequent requests on behalf of that tenant.

Common scenarios where this node is beneficial include:

  • Automating tenant onboarding workflows by programmatically generating access tokens.
  • Integrating tenant authentication into custom applications or services.
  • Managing multi-tenant environments where each tenant requires secure API access tokens.

Example use case:

  • You have a multi-tenant SaaS platform and want to automate the generation of tenant-specific tokens after tenant creation, enabling seamless API interactions for each tenant without manual intervention.

Properties

Name Meaning
Authentication Mode Choose how to authenticate with the Lectful Central API:
- Use Stored Credentials
- Manual Configuration (provide base URL and API key manually)
Credentials Note Notice shown when using Manual Configuration mode explaining credential usage
Base URL Override Optional base URL to override the stored credential setting (exclude /api/v1)
API Key Override Optional API key to override the stored credential setting
Tenant ID The unique identifier of the tenant for which to generate the token (required)
Tenant Email Email address of the tenant's admin user (required)
Tenant Password Password of the tenant's admin user (required)

Output

The node outputs JSON data containing the response from the Lectful Central API for the Generate Tenant Token operation. Typically, this will include the generated authentication token and any associated metadata returned by the API.

If the API returns a string response, the node attempts to parse it as JSON before outputting.

No binary data output is produced by this operation.

Dependencies

  • Requires access to the Lectful Central API.
  • Requires either:
    • Stored credentials configured in n8n with a base URL and API key for the Lectful Central API, or
    • Manual configuration of the base URL and API key via input properties.
  • The node uses HTTP Bearer token authentication with the provided API key.
  • No additional external dependencies are required.

Troubleshooting

  • Missing or invalid credentials error:
    If using "Use Stored Credentials" mode, ensure that valid credentials (base URL and API key) are configured in n8n. Alternatively, switch to "Manual Configuration" mode and provide these values explicitly.

  • Base URL or API key missing in Manual Configuration mode:
    Both Base URL Override and API Key Override must be provided when using manual mode; otherwise, the node throws an error.

  • Invalid tenant ID or credentials:
    Ensure the tenant ID, tenant email, and tenant password are correct. Incorrect values will cause the API to reject the token generation request.

  • API request failures:
    Network issues, incorrect base URL, or API downtime can cause errors. Check connectivity and API status.

  • JSON parsing errors:
    If the API returns a non-JSON string unexpectedly, the node logs a warning but outputs the raw string.

Links and References


This summary is based solely on static analysis of the provided source code and property definitions.

Discussion