Actions10
- Api Access Token Actions
- Store App Actions
- Custom App Actions
- User ID Actions
Overview
This node, named "Lark Auth," is designed to manage authentication for Lark Suite API interactions. Specifically, the provided operation "Code2sessionused In Gadget Scenarios" under the resource "Api Access Token" facilitates obtaining an access token or session code used in gadget scenarios within the Lark ecosystem. This is useful when integrating custom gadgets or applications that require authenticated access to Lark services.
Typical use cases include:
- Authenticating a gadget or app to interact with Lark APIs securely.
- Exchanging codes for session tokens in embedded gadget environments.
- Managing different authentication methods (Tenant Token or OAuth2) depending on the integration scenario.
Properties
Name | Meaning |
---|---|
Authentication | Method of authentication to use: either "Tenant Token" or "OAuth2". |
Use Custom Body | Boolean flag indicating whether to send a custom JSON body instead of the default request. |
Custom Body | A JSON object representing the custom body to send if "Use Custom Body" is enabled. |
Output
The node outputs JSON data containing the response from the Lark API related to the access token or session information. The exact structure depends on the API response but typically includes fields such as access tokens, expiration times, and session details relevant to gadget scenarios.
No binary data output is indicated by the source code.
Dependencies
- Requires configuration of one of two authentication credentials:
- An API key credential representing a Tenant Token.
- An OAuth2 credential for OAuth2-based authentication.
- The base URL for API requests is
https://open.larksuite.com
. - The node expects JSON content-type headers for requests and responses.
Troubleshooting
- Authentication errors: Ensure that the correct authentication method is selected and that the corresponding credentials are properly configured in n8n.
- Invalid or malformed custom body: If using the "Custom Body" option, verify that the JSON is correctly formatted and matches the expected API schema.
- API connectivity issues: Confirm network access to
https://open.larksuite.com
and that no firewall or proxy blocks the requests. - Unexpected API responses: Check that the parameters and authentication align with the Lark API documentation for the specific gadget scenario.