Get material list
Get the material list
After adding permanent materials, developers can obtain permanent materials by type list.
Please note:
1. Obtain the list of permanent materials, which also includes graphic messages, voice, video and other materials created by public accounts in the material management module of the official website of the public platform
2 , Temporary materials cannot be obtained through this interface
3. The https protocol is required to call this interface
Interface call request instructions
http request method: POST
https://api.weixin.qq.com/cgi-bin/material/batchget_material?access_token=ACCESS_TOKEN
{
"type":TYPE,
"offset":OFFSET,
"count":COUNT
}
"offset":OFFSET,
"count":COUNT
}
Is it necessary | Description | |
is the type of | material, including image, video, voice, news | |
is | and returns from the offset position of all materials. 0 means returning from the first material. | |
Yes | The number of returned materials, the value is between 1 and 20 |
Parameter | Description |
total_count | This type The total number of materials |
item_count | The number of materials obtained by this call |
title | The title of the graphic message |
thumb_media_id | The cover picture material id of the graphic message (must be a permanent mediaID) |
show_cover_pic | Whether to display the cover, 0 is false, that is, it is not displayed, 1 is true, that is, it is displayed |
author | author |
digest | The summary of the graphic message. Only single graphic messages have digests. Multiple graphic messages are left empty. |
content | The specific content of the graphic message supports HTML tags and must be less than 20,000 characters and less than 1M, and JS will be removed here |
url | The URL of the picture and text page, or when the obtained list is a list of picture materials, this field is the URL of the picture |
The original text of the picture and text message Address, that is, the URL after clicking "Read original text" | |
The last update time of this graphic message material | |
File name |
{"errcode":40007,"errmsg":"invalid media_id"}