fetchAppInfoListByIds
The fetchAppInfoListByIds API is called by the super app to run a query with a unique mini program ID to asynchronously fetch a list of mini programs that are launched to their app. This API provides a pagination capability to return the data.
Method signature
function fetchAppInfoListByIds(
request: FetchAppsByIdsRequest,
success: (result: AppInfosResult) => void,
error?: (error: BaseError) => void
)
Request parameters
Field | Data type | Required | Description |
request | Yes | An object that is used to set query conditions of mini programs. | |
success | Yes | The result that is used to return a list of mini programs that match the specified query conditions. | |
error | No | The callback that is executed upon failure to query. When executed, it receives an instance of BaseError object that includes the error code and its corresponding error description. Specify this parameter if you need to handle the encountered errors. |
Response parameters
N/A
Error code
Error code | Error message | Further action | |
2 | INVALID_PARAMETER | Parameter error. | Refer to the Request parameters table and check whether all parameter types are correct and if all required parameters are specified. |
3 | UNKNOWN_ERROR | Server fluctuations. | Retry the request. If the problem persists, please contact overseas_support@service.alibaba.com for help. |
10104 | NETWORK_ERROR | Network error. | Check the network connection and try again. |
Sample
function fetchAppListByIdFunc() {
var appIdList = ['34560xxxxxxxx0156'];
var requestVo: FetchAppsByIdsRequest = {
appIdList: appIdList,
};
fetchAppInfoListByIds(
requestVo,
(result: AppInfosResult) => {
// result
},
(error: BaseError) => {
// error
}
);
}