Actions10
- Api Access Token Actions
- Store App Actions
- Custom App Actions
- User ID Actions
Overview
This custom n8n node, named "Lark Auth," is designed to manage authentication for Lark Suite API integrations. Specifically, the "Get Tenantaccesstoken" operation under the "Custom App" resource allows users to obtain a tenant access token for their custom applications within Lark Suite. This token is essential for authenticating API requests on behalf of a tenant.
Common scenarios where this node is beneficial include:
- Automating workflows that require secure access to Lark Suite APIs using tenant-level credentials.
- Integrating custom apps with Lark Suite services by programmatically retrieving access tokens.
- Managing multi-tenant environments where tokens need to be refreshed or obtained dynamically.
Practical example:
A user wants to automate sending messages or managing resources in Lark Suite via a custom app. They use this node to fetch the tenant access token by providing the app ID and secret, then use the token in subsequent API calls.
Properties
Name | Meaning |
---|---|
Authentication | Method of authentication to use: either "Tenant Token" or "OAuth2". |
App Id | The application identifier for the custom app requesting the tenant access token. |
App Secret | The secret key associated with the custom app, used alongside the App Id for authentication. |
Options | Additional options; currently supports: "Use Custom Body" (boolean) to specify if a custom request body should be used. |
Output
The node outputs JSON data containing the tenant access token information retrieved from the Lark Suite API. Typically, this includes fields such as the access token string and its expiration time.
If binary data were involved (not indicated here), it would represent raw response payloads or files, but this node focuses on JSON token data.
Dependencies
- Requires an active internet connection to communicate with the Lark Suite API endpoint at
https://open.larksuite.com
. - Needs valid credentials: either a tenant token credential or OAuth2 credential configured in n8n.
- The node uses HTTP headers to pass the
app_id
andapp_secret
values when making requests.
Troubleshooting
- Invalid Credentials: If the app ID or secret is incorrect, the API will reject the request. Verify these values carefully.
- Authentication Mismatch: Selecting the wrong authentication method (Tenant Token vs OAuth2) may cause authorization failures.
- Network Issues: Connectivity problems can prevent token retrieval. Ensure n8n has network access to the Lark Suite API.
- Missing Required Fields: Omitting the app ID or secret will result in errors. Both must be provided.
- API Rate Limits: Excessive requests might lead to throttling; handle retries accordingly.
Links and References
- Lark Suite Developer Documentation
- Lark Suite Authentication Guide
- n8n Documentation on Creating Custom Nodes