API Description

Uploads the images you want to use in the Shake feature. The images are saved on the WeChat server. The supported image formats are: jpg, jpeg, png, gif.

If the image is displayed on the Shake page, it should be a square image of icon type. The recommended image dimension is 120px*120 px, and the maximum image dimension is 200 px *200 px.

For an image of the qualification file that needs to be uploaded to activate the Shake Nearby feature, it should be of license type with no dimension and shape limit. The file size of the image cannot be larger than 2 MB.

API Request Format

HTTP request method: POST (use the HTTPS protocol) https://api.weixin.qq.com/shakearound/material/add?access_token=ACCESS_TOKEN&type=TYPEPOST data format: FORM
POST data example:
Calling Example (using the curl command to upload a multimedia file via FORM):
curl -F "media=@IMAGE_NAME"
"https://api.weixin.qq.com/shakearound/material/add?access_token=ACCESS_TOKEN&type=TYPE"

Parameters

Parameter Required Description
access_token Yes The credential for calling the API
media Yes Image name
type No Icon: The icon image displayed on the Shake page; License: The qualification file that needs to be uploaded to activate the Shake Nearby feature. If no type is passed, the type will be icon by default.

**Response ** Example of the JSON packet returned for a successful request:

{
"data": {
"pic_url":
"http://shp.qpic.cn/wechat_shakearound_pic/0/1428377032e9dd2797018cad79186e03e8c5aec8dc/120"
    },
    "errcode": 0,
    "errmsg": "success."
}

Parameters

Parameter Description
pic_url The URL of image. If the type is icon, it can be used in the "icon_url" field of "Add Page" and "Edit Page"; if the type is license, it can be used in the "qualification_cert_urls" field of "Apply to Become a Contracted Merchant"