微信公众号 icon

微信公众号

微信公众号 API

Overview

This node interacts with the WeChat Official Account API, specifically focusing on managing permanent media assets under the "素材管理" (Asset Management) resource. The "删除永久素材" (Delete Permanent Material) operation allows users to delete a permanent media asset from their WeChat account by specifying its unique media ID. This is useful for maintaining and organizing media libraries by removing outdated or unwanted materials.

Practical examples include:

  • Automatically cleaning up unused images or videos from your WeChat media library.
  • Managing storage limits by deleting large or obsolete media files.
  • Integrating media management into automated workflows that update content dynamically.

Properties

Name Meaning
媒体ID The unique media ID of the permanent material to be deleted. This is required to identify which media asset should be removed.

Output

The node outputs JSON data representing the response from the WeChat API after attempting to delete the specified permanent media. Typically, this will include success or error information indicating whether the deletion was successful.

If the node supports binary data output, it would relate to media content, but in this case, since the operation is deletion, no binary output is expected.

Dependencies

  • Requires an API key credential for authenticating with the WeChat Official Account API.
  • The base URL defaults to https://api.weixin.qq.com/cgi-bin/ unless overridden by credentials.
  • Proper permissions on the WeChat Official Account are necessary to manage permanent media assets.

Troubleshooting

  • Common issues:

    • Invalid or missing media ID: Ensure the media ID provided exists and is correct.
    • Insufficient permissions: Verify that the API key has rights to delete permanent media.
    • Network or API errors: Check connectivity and API status.
  • Common error messages:

    • "media_id is invalid": The media ID does not correspond to any existing permanent media.
    • "access_token is invalid or expired": Refresh or provide a valid API authentication token.
    • "no permission to delete media": The authenticated user lacks the required permissions.

Resolving these typically involves verifying input parameters, refreshing credentials, and ensuring proper API access rights.

Links and References

Discussion