search
  • Sign In
  • Sign Up
Password reset successful

Follow the proiects vou are interested in andi aet the latestnews about them taster

Get material list

Collection 105
Read 40452
update time 2016-09-11

Get the material list

1476061831189559.jpg

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

##Call example

{
"type":TYPE,
"offset":OFFSET,
"count":COUNT
}


##Parameter Description

Parametertypeoffsetcount

Return instructions

The response to the permanent graphic message material list is as follows:

{
"total_count": TOTAL_COUNT,
"item_count": ITEM_COUNT,
"item": [{
"media_id": MEDIA_ID,
"content": {
"news_item": [{
"title": TITLE,
" thumb_media_id": THUMB_MEDIA_ID,
"show_cover_pic": SHOW_COVER_PIC(0 / 1),
"author": AUTHOR,
"digest": DIGEST,
"content": CONTENT,
" url": URL,
"content_source_url": CONTETN_SOURCE_URL
},
//Multiple graphic and text messages will have multiple articles here
time" : UPDATE_TIME
},
//There may be multiple image and text message item structures
]
}
Other types (pictures, voices, videos) are returned as follows:
{
"total_count": TOTAL_COUNT,
"item_count": ITEM_COUNT,
"item": [{
"media_id": MEDIA_ID,
"name": NAME,
"update_time" : UPDATE_TIME,
"url":URL
},
//There may be multiple materials
]
}

Return parameter description

Is it necessaryDescription
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.
YesThe number of returned materials, the value is between 1 and 20
##content_source_urlThe original text of the picture and text message Address, that is, the URL after clicking "Read original text"update_timeThe last update time of this graphic message materialnameFile name
ParameterDescription
total_countThis type The total number of materials
item_countThe number of materials obtained by this call
title The title of the graphic message
thumb_media_idThe cover picture material id of the graphic message (must be a permanent mediaID)
show_cover_picWhether to display the cover, 0 is false, that is, it is not displayed, 1 is true, that is, it is displayed
authorauthor
digestThe 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
urlThe 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 example of the returned JSON data packet in the error case is as follows (the example is invalid media type error):


{"errcode":40007,"errmsg":"invalid media_id"}
Hot AI Tools
Undress AI Tool
Undress AI Tool

Undress images for free

AI Clothes Remover
AI Clothes Remover

Online AI tool for removing clothes from photos.

Undresser.AI Undress
Undresser.AI Undress

AI-powered app for creating realistic nude photos

ArtGPT
ArtGPT

AI image generator for creative art from text prompts.

Stock Market GPT
Stock Market GPT

AI powered investment research for smarter decisions

Popular tool
Notepad++7.3.1
Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version
SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1
Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6
Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version
SublimeText3 Mac version

God-level code editing software (SublimeText3)