During the process of developing the H5 panel, we need to obtain product information, device information, or the device online status, and control the device. These capabilities are provided through the application-side API. The complete list of APIs can be referred to Application-side API. The H5 custom development SDK encapsulates the process of calling the application-side API, thereby facilitating developers to make calls.
Calling Application API
The H5 SDK encapsulates the calling procedure of the application-side API. When sending a request, it will automatically carry the common parameters
AccessToken and RequestId.API definition
sdk.requestTokenApi(action, data, options) => Promise
{parameter description}
Parameter Name | Type | Required | Parameter Description |
action | string | Yes | Specific application-side API Action Names, such as: AppGetDeviceStatuses. |
data | object | No | Interface call parameters. |
options | object | No |
return value
Request succeeded (code=0)
Return a resolved Promise with the value of the
Response part of data in the application side API response.request failure
Return a rejected Promise with a value having a data structure of:
{ code, msg,... detail }.