Zalo OA icon

Zalo OA

Tương tác với Zalo Official Account API

Overview

This node integrates with the Zalo Official Account (OA) API, enabling users to manage various aspects of their Zalo OA such as messaging, articles, products, categories, orders, tags, followers, and menus. Specifically, the "Xóa Bài Viết" (Remove Article) operation allows users to delete an article from their Zalo OA by providing the article's token.

Common scenarios for this node include:

  • Automating content management on a Zalo Official Account by creating, updating, or deleting articles.
  • Managing product catalogs and orders within the Zalo OA store.
  • Sending different types of messages (text, image, file, list) to users.
  • Handling user tags and follower information.
  • Uploading media files like images and GIFs to the OA.

Practical example for "Xóa Bài Viết":

  • A marketing automation workflow that removes outdated or incorrect articles from the Zalo OA automatically based on certain triggers or schedules.

Properties

Name Meaning
Token Bài Viết The token (identifier) of the article to be deleted. This is required to specify which article to remove.

Output

The output is a JSON object containing the response from the Zalo OA API after attempting to remove the article. It typically includes success status and any relevant messages or error details.

If the removal is successful, the JSON will confirm the deletion. If there is an error, the JSON will contain an error flag set to true, an error message, and possibly additional response data from the API explaining the failure.

No binary data output is involved in this operation.

Dependencies

  • Requires an API access token credential for Zalo Official Account API authentication.
  • Uses the Zalo OA API endpoint at https://openapi.zalo.me/v2.0/article/remove.
  • The node depends on the axios HTTP client library for making API requests.
  • Proper permissions must be granted to the access token to allow article deletion.

Troubleshooting

  • Common issues:

    • Invalid or expired token for the article: Ensure the token corresponds to an existing article and is current.
    • Insufficient permissions: The access token must have rights to delete articles on the OA.
    • Network or API errors: Check connectivity and API availability.
  • Error messages and resolutions:

    • "Lỗi khi xóa bài viết: <message>": Indicates failure during article deletion. Verify the article token and access rights.
    • API response errors may include HTTP status codes and detailed messages; review these to adjust parameters or permissions.
    • If the article does not exist or has already been deleted, the API may return an error indicating so.

Links and References


Note: This summary focuses solely on the "Xóa Bài Viết" operation under the "Zalo OA" resource as requested.

Discussion