# pluginManager.getPluginList

Call this API at the server side. For more information, see Server API.

This API supports Cloud Calls. The WeChat DevTools version must be 1.02.1904090 or later (download the latest stable version here), and the wx-server-sdk version must be 0.4.0 or later.

Queries added plug-ins.

Calling methods:

# HTTPS Call

# Request Address

POST https://api.weixin.qq.com/wxa/plugin?access_token=TOKEN

# Request Parameters

Attribute Type Default Required Description
access_token string Yes Credentials to call API
action string Yes Enter "list" in this API.

# Return Value

# Object

JSON data package that is returned

Attribute Type Description
errcode number Error code
errmsg string Error message
plugin_list Array.<Object> The list of plug-ins that are being applied for or in use.

plugin_list is composed as follows

Property Type Description
appid string The AppID of the plug-in
status number The status of the plug-in
nickname string The name of the plug-in
headimgurl string The profile photo of the plug-in

Valid values of status

Value Description Minimum Version
1 Applying
2 Approved
3 Rejected
4 Timed out

# Errors

Error Code Error Message Description
0 ok Normal
-1 System error
89236 This plug-in is not available for application.
89237 This plug-in has been added.
89238 The upper limit of plug-ins that are being applied for or in use is exceeded.
89239 The plug-in does not exist.
89240 Cannot perform this operation. Only "Pending" requests can be approved/rejected.
89241 Cannot perform this operation. Only "Rejected/Timed Out" requests can be deleted.
89242 This AppID is not in the request list.
89243 "Pending" requests cannot be deleted.
89044 The AppID of this plug-in does not exist.

# Request Data Example

{
  "action":"list"
}

# Return Data Example

{
  "errcode": 0,
  "errmsg": "ok",
  "plugin_list": [{
    "appid": "aaaa",
    "status": 1,
    "nickname": "The name of the plug-in",
    "headimgurl": "http://plugin.qq.com"
  }]
}

# Cloud Call

Cloud call is a capability provided by Mini Program·Cloud Base that allows you to call WeChat APIs in a cloud function. It must be used via wx-server-sdk in the cloud function.

# API Calling Method

openapi.pluginManager.getPluginList

You need to configure the permissions for the pluginManager.getPluginList API via config.json. Details

# Request Parameters

Attribute Type Default Required Description
action string Yes Enter "list" in this API.

# Return Value

# Object

JSON data package that is returned

Attribute Type Description
errCode number Error code
errMsg string Error message
pluginList Array.<Object> The list of plug-ins that are being applied for or in use.

pluginList is composed as follows

Property Type Description
appid string The AppID of the plug-in
status number The status of the plug-in
nickname string The name of the plug-in
headimgurl string The profile photo of the plug-in

Valid values of status

Value Description Minimum Version
1 Applying
2 Approved
3 Rejected
4 Timed out

# Exceptions

# Object

Thrown Exceptions

Property Type Description
errCode number Error code
errMsg string Error message

Valid values of errCode

Value Description Minimum Version

# Errors

Error Code Error Message Description
0 ok Normal
-1 System error
89236 This plug-in is not available for application.
89237 This plug-in has been added.
89238 The upper limit of plug-ins that are being applied for or in use is exceeded.
89239 The plug-in does not exist.
89240 Cannot perform this operation. Only "Pending" requests can be approved/rejected.
89241 Cannot perform this operation. Only "Rejected/Timed Out" requests can be deleted.
89242 This AppID is not in the request list.
89243 "Pending" requests cannot be deleted.
89044 The AppID of this plug-in does not exist.

# Request Data Example

const cloud = require('wx-server-sdk')
  cloud.init()
  exports.main = async (event, context) => {
    try {
      const result = await cloud.openapi.pluginManager.getPluginList({
        action: 'list'
      })
      console.log(result)
      return result
    } catch (err) {
      console.log(err)
      return err
    }
  }

# Return Data Example

{
  "errCode": 0,
  "errMsg": "openapi.pluginManager.getPluginList:ok",
  "pluginList": [
    {
      "appid": "aaaa",
      "status": 1,
      "nickname": "The name of the plug-in",
      "headimgurl": "http://plugin.qq.com"
    }
  ]
}