Lark Auth icon

Lark Auth

Lark Auth Management

Overview

This node, named "Lark Auth," is designed to manage authentication tokens for the Lark platform. Specifically, it supports obtaining an app access token through two authentication methods: Tenant Token and OAuth2. This node is useful when integrating with Lark APIs that require authenticated requests, enabling users to programmatically retrieve and refresh access tokens as needed.

Common scenarios include:

  • Automating workflows that interact with Lark services requiring app-level authentication.
  • Managing token renewal in integrations without manual intervention.
  • Supporting different authentication schemes depending on organizational setup (tenant token vs OAuth2).

Example use case:

  • A workflow that posts messages to Lark chats after retrieving a valid app access token using this node.

Properties

Name Meaning
Authentication Method of authentication to use for obtaining the app access token. Options: Tenant Token, OAuth2
Options Additional options for the request. Currently supports: Use Custom Body (boolean) to specify if a custom request body should be used

Output

The node outputs JSON data containing the app access token information retrieved from Lark's authentication service. The exact structure typically includes fields such as the access token string, its expiration time, and possibly token type or scope details.

No binary data output is indicated.

Dependencies

  • Requires an API key credential corresponding to either Tenant Token or OAuth2 authentication configured in n8n.
  • Connects to Lark's official API endpoint at https://open.larksuite.com.
  • Proper configuration of credentials in n8n is necessary to authenticate successfully.

Troubleshooting

  • Invalid Credentials: If the provided API key or OAuth2 token is incorrect or expired, the node will fail to retrieve the access token. Verify credentials and reauthenticate if needed.
  • Network Issues: Connectivity problems to Lark's API endpoint can cause errors. Ensure network access and proxy settings allow outbound HTTPS requests.
  • Incorrect Authentication Selection: Selecting the wrong authentication method for your Lark app setup will result in authorization failures. Confirm which method your app uses.
  • Custom Body Misuse: Enabling "Use Custom Body" without providing a valid body may cause request errors. Use this option only if you know the required payload format.

Links and References

Discussion