# getIotBindContactList(Object req)
This interface is asynchronous and returns the
Promiseobject.
From openId, the query specifies whether the user has authorized a device.
# parameter
# Object req
| attribute | type | Default values | Required to fill in | Introductions |
|---|---|---|---|---|
| sn | string | yes | Equipment SN | |
| model_id | string | yes | Model_id of the device | |
| openid_list | string[] | yes | List of users openId to query |
# Return value
# Object
| attribute | type | Introductions |
|---|---|---|
| errcode | number | Error code |
| errmsg | string | Error message |
| contact_list | Info[] | OpenID authorization information, status: 1 means authorized, 0 means unauthorized |
# sample code
const wmpfVoip = requirePlugin('wmpf-voip').default
wmpfVoip
.getIotBindContactList({
sn: '设备sn',
model_id: '申请的modelid',
openid_list: ['openid_1', 'openid_2'], // 传入需要验证的openid列表
})
.then(res => {
console.log(`[getIotBindContactList]:`, res.contact_list)
// [{sn: 'xxx', model_id: 'xxx', status: 0}]
// status: 0/未授权;1/已授权
})