Actions43
- 用户标签 Actions
- 用户 Actions
- 模板 Actions
- 发布 Actions
- 其他 Actions
- 菜单 Actions
- 素材 Actions
- 草稿 Actions
- 评论 Actions
Overview
This node generates QR codes with parameters for WeChat Official Accounts. It supports creating two types of QR codes: temporary and permanent. Temporary QR codes have a limited validity period, while permanent ones do not expire. This functionality is useful for scenarios such as marketing campaigns, event check-ins, or user identification where dynamic QR codes are needed to encode specific scene information.
Practical examples:
- Generating a temporary QR code valid for 1 hour that encodes a session ID for a limited-time promotion.
- Creating a permanent QR code linked to a product or service identifier for long-term use in physical stores or printed materials.
Properties
| Name | Meaning |
|---|---|
| 二维码类型 | Type of QR code to generate. Options: 临时二维码 (Temporary QR code), 永久二维码 (Permanent QR code) |
| 有效时间(秒) | Validity duration in seconds for the temporary QR code. Maximum is 2592000 (30 days). Only applicable if QR code type is temporary. |
| 场景值ID | Scene value ID as a string (length 1 to 64). Represents the parameter encoded in the QR code. |
Output
The node outputs JSON data containing the generated QR code information. The exact structure depends on the WeChat API response but typically includes fields such as the QR code URL, ticket, and expiration time (for temporary codes). The output does not include binary image data; instead, it provides URLs or identifiers to retrieve or display the QR code externally.
Dependencies
- Requires an API key credential for authenticating with the WeChat Official Account platform.
- The node depends on the WeChat Official Account API to generate QR codes.
- Proper configuration of credentials within n8n is necessary to enable API calls.
Troubleshooting
- Common issues:
- Invalid or missing API credentials will cause authentication failures.
- Specifying an invalid
expire_secondsvalue (e.g., exceeding 2592000) may result in errors. - Providing a
scene_strlonger than 64 characters will likely cause validation errors.
- Error messages:
- Errors related to "未实现方法" (unimplemented method) indicate unsupported resource-operation combinations.
- API errors from WeChat may include rate limiting or invalid parameter messages; verify input values and credentials.
- To resolve errors, ensure all required properties are correctly set, credentials are valid, and input constraints are respected.