Lectful icon

Lectful

Interact with the VIPay Lectful API

Overview

This node integrates with the Lectful API, providing a wide range of operations to manage authentication, users, courses, lectures, enrollments, and other educational resources. Specifically, for the Authentication - Refresh Token operation, it allows refreshing the current access token to maintain an authenticated session without requiring the user to log in again.

Typical use cases include:

  • Automatically refreshing access tokens in workflows that require continuous or repeated API access.
  • Maintaining session validity in automation scenarios where long-running processes interact with Lectful.
  • Ensuring seamless user experience by programmatically handling token expiration.

Example: A workflow that periodically fetches user progress data can use this node's refresh token operation to renew the access token before making further requests.

Properties

Name Meaning
Authentication Mode Choose how to authenticate with the Lectful API:
- Use Stored Credentials (configured in n8n)
- Manual Configuration (provide Base URL and API key manually)
Credentials Note Notice shown when using Manual Configuration mode, explaining that credentials field can be left empty and overrides will be used instead.
Base URL Override Optional base URL to override the credential setting (without /api/v1). Used only in Manual Configuration mode.
API Key Override Optional API key to override the credential setting. Used only in Manual Configuration mode.

Output

The node outputs the JSON response from the Lectful API corresponding to the refresh token request. The structure typically includes the new access token and possibly related metadata such as expiry time.

Output example (conceptual):

{
  "access_token": "newly_generated_access_token",
  "expires_in": 3600,
  "token_type": "Bearer"
}

No binary data is output by this operation.

Dependencies

  • Requires either stored credentials configured in n8n with a valid Lectful API base URL and API key, or manual entry of these parameters.
  • Uses HTTP requests with Bearer token authorization.
  • No additional external dependencies beyond network access to the Lectful API.

Troubleshooting

  • Missing or invalid credentials:
    Error if neither stored credentials nor manual configuration parameters are provided or valid.
    Resolution: Ensure credentials are properly configured or provide manual Base URL and API key.

  • Base URL or API key missing in manual mode:
    Throws error if Base URL Override or API Key Override is empty when Manual Configuration is selected.
    Resolution: Provide both Base URL Override and API Key Override values.

  • API errors from Lectful:
    Errors returned by the API (e.g., invalid token, expired refresh token) will be passed through.
    Resolution: Verify API key validity and token status; re-authenticate if necessary.

  • Network issues:
    Connectivity problems may cause request failures.
    Resolution: Check network connectivity and Lectful API availability.

Links and References

Discussion