没有不值得去解决的问题,也没有不值得去学习的技术!

WeChat Official Account API for Adding Permanent Video Media Fails After Upload

In Postman, the request header is set to form-data. There are 2 request body parameters: description, with the format set to Text; and media, with the format set to File

1. Reference URL: https://developers.weixin.qq.com/doc/offiaccount/Asset_Management/Adding_Permanent_Assets.html . As shown in Figure 1

Reference URL: https://developers.weixin.qq.com/doc/offiaccount/Asset_Management/Adding_Permanent_Assets.html
Figure 1

2. In Postman, the request header is set to form-data. There are 2 request body parameters: description, with the format set to Text; and media, with the format set to File. As shown in Figure 2

In Postman, the request header is set to form-data. There are 2 request body parameters: description, with the format set to Text; and media, with the format set to File
Figure 2
Plaintext

description={"title":"VIDEO_TITLE","introduction":"INTRODUCTION"}
media=@h264_2000k_mp4.mp4

JSON

{
    "media_id": "1gCdtqCQ5Mv0ziRAQov85-VxHX7WpDjRmHnCdmX2RBE",
    "item": []
}

3. When the request body parameter description is removed, the response fails. As shown in Figure 3

When the request body parameter description is removed, the response fails.
Figure 3
JSON

{
    "errcode": 41005,
    "errmsg": "media data missing hint: [bhDfBa0363d418] rid: 60e6c4a6-64b78b4a-5be3301c"
}

4. Go to the Material Management module on the Official Platform website to view the video list. The corresponding material, VIDEO_TITLE, is present. However, after a full day, it still has not been approved. I uploaded a total of 3 videos consecutively, and the same thing happened to all of them. As shown in Figure 4

Go to the Material Management module on the Official Platform website to view the video list. The corresponding material, VIDEO_TITLE, is present. However, after a full day, it still has not been approved. I uploaded a total of 3 videos consecutively, and the same thing happened to all of them.
Figure 4

5. When the same video file is uploaded via the official website, it can be approved within a short period of time. As shown in Figure 5

When the same video file is uploaded via the official website, it can be approved within a short period of time.
Figure 5

6. Call the API to get the video material list. In the response, the 3 videos uploaded via the API do not contain the field: vid. As shown in Figure 6

Call the API to get the video material list. In the response, the 3 videos uploaded via the API do not contain the field: vid.
Figure 6

7. I found related questions and replies in the WeChat Open Community. URL: https://developers.weixin.qq.com/community/minihome/doc/0000acea168dc82664ba9d86d52000 . Hello, currently in the material management API, uploaded video materials are not submitted for review. The status displayed in the material management list on the WeChat Official Platform backend will be abnormal, and they cannot be used for regular scenarios such as mass messaging. If you currently need to upload and use videos, we recommend uploading them directly through the WeChat Official Platform backend. For guidelines related to official account video uploads, please refer to: https://support.qq.com/products/66522/faqs/54079

关于作者 · 持续学习与技术实践

我是一名拥有 15 年以上开发经验的技术从业者,自 2013 年起持续运营个人技术博客,记录工作与个人项目中遇到的真实问题,以及解决问题过程中的探索、实践和思考。

除了技术写作,我也在持续开发和维护自己的独立项目,探索新技术和新工具在实际场景中的应用。我始终相信,没有不值得去解决的问题,也没有不值得去学习的技术。

如果这篇文章对你有所帮助,欢迎浏览博客中的其他文章,也欢迎交流技术经验与想法。

关于我  ·  GitHub  ·  邮件联系