删除永久素材

请谨慎操作本接口,因为它可以删除公众号在公众平台官网素材管理模块中新建的图文消息、语音、视频等素材(但需要先通过获取素材列表来获知素材的media_id)

删除永久素材的接口说明:

https://developers.weixin.qq.com/doc/offiaccount/Asset_Management/Deleting_Permanent_Assets.html

Dim url As String = "https://api.weixin.qq.com/cgi-bin/material/del_material?access_token={0}"
Dim
hc As New HttpClient(CExp(url, Functions.Execute("GetAccessToken")))
Dim
jo As New JObject
jo
("media_id") = "eHDdfBQmRtOJ-PtkD6WENicqBE7-tFFczZ6p5ZUnz0k" '要删除的图片素材ID
hc
.Content = jo.ToString()
Dim jo As JObject = JObject.Parse(hc.getdata)
If
jo("errcode").ToString = "0" Then
   
MessageBox.Show("删除成功")
Else

    MessageBox.Show(
"删除失败:" & jo("errmsg").ToString)
End
If