With this API, developers can obtain the permanent asset list and save it to the local device when needed.
Notes:
- The assets in Media Asset Management on Official Accounts Platform will also be included into the total number of permanent assets.
- The limit for the total number of images and articles (including single article and multiple articles) is 5000, and that for the total number of other types is 1000.
- This API must be called using the HTTPS protocol.
API Request Format
HTTP request method: GET
https://api.weixin.qq.com/cgi-bin/material/get_materialcount?access_token=ACCESS_TOKEN
Response Description
{
"voice_count":COUNT,
"video_count":COUNT,
"image_count":COUNT,
"news_count":COUNT
}
Response Parameters
Parameter | Description |
---|---|
voice_count | Total number of voices |
video_count | Total number of videos |
image_count | Total number of images |
news_count | Total number of articles |
The returned JSON packet for a failed request (this is an example of invalid media type):
{"errcode":-1,"errmsg":"system error"}