API description

This API is used to configure the linkage between a device and the pages pushed to users via the Shake-Nearby feature. The ID list of the pages to be linked to the device needs to be input (the old pages linked to the device are directly cleared).

The ID list of the pages can be empty. When list is empty, all linkages with the device are cleared.

After the configuration, the linked pages are displayed when users use the Shake-Nearby feature within the signal range of the device.

After applying for the device ID, you can directly configure the linked pages using the API.

If multiple pages are linked to the device, the pages are pushed to users randomly. A maximum of 30 pages can be configured for a device.

API Request Format

HTTP request method: POST (use the HTTPS protocol)https://api.weixin.qq.com/shakearound/device/bindpage?access_token=ACCESS_TOKEN
POST data format: json
POST data example:
   "page_ids":[12345, 23456, 334567]	


Parameter Required Description
access_token Yes The credential for calling the API
page_ids Yes List of pages to be linked
device_identifier Yes The device ID for the specified page
device_id Yes Device ID. If UUID+major+minor is entered, device ID is optional. If both are entered, device ID is preferred.
UUID, major, minor Yes If device ID is entered, this parameter is optional. If device ID is left empty, all the three parts of the parameter are required.


Example of JSON packet returned for a successful request:

  "data": {
  "errcode": 0,
  "errmsg": "success."