# Limitation on Calling APIs via Plug-Ins

APIs that can be called via plug-ins differ from Mini Programs in mainly two aspects:

  • The requested domain name list of plug-ins is independent of that of Mini Programs.
  • Some APIs cannot be called by plug-ins (Such API functions are not under the wx object).

Some APIs are unavailable in plug-ins, but can be called on feature pages of plug-ins. For more information, refer to Feature Pages of Plug-Ins.

APIs that can be called by plug-ins and their required versions are as follows:

# Initiating a Request

API Minimum Version Remarks
wx.request 1.9.6

# Upload and Download

API Minimum Version Remarks
wx.downloadFile 1.9.6
wx.uploadFile 1.9.6

# WebSocket

API Minimum Version Remarks
wx.connectSocket 1.9.6

# Image

# Recording

API Minimum Version Remarks
wx.startRecord 1.9.6
wx.stopRecord 1.9.6

# Real-Time Audio and Video

# Recording Management

API Minimum Version Remarks
wx.getRecorderManager 1.9.94

# Audio Playback Control

# Music Playback Control

# Background Audio Playback Management

API Minimum Version Remarks
wx.getBackgroundAudioManager 1.9.6

# Audio Component Control

# Video

# Video Component Control

API Minimum Version Remarks
wx.createVideoContext 1.9.6

# Camera Component Control

API Minimum Version Remarks
wx.createCameraContext 1.9.6

# Data Caching

# Obtaining a Location

API Minimum Version Remarks
wx.getLocation 1.9.6
wx.chooseLocation 1.9.6

# Viewing a Location

API Minimum Version Remarks
wx.openLocation 1.9.6

# Map Component Control

API Minimum Version Remarks
wx.createMapContext 1.9.6

# System Information

API Minimum Version Remarks
wx.getSystemInfoSync 1.9.6
wx.getSystemInfo 1.9.6

# Screen Brightness

# User Screenshot Event

API Minimum Version Remarks
wx.onUserCaptureScreen 1.9.6 Called only on plug-in pages

# Vibration

API Minimum Version Remarks
wx.vibrateLong 1.9.6
wx.vibrateShort 1.9.6

# Mobile Contacts

API Minimum Version Remarks
wx.addPhoneContact 1.9.6

# NFC

# Network Status

# Accelerometer

# Compass

# Making a Call

API Minimum Version Remarks
wx.makePhoneCall 1.9.6

# Scanning a QR Code

API Minimum Version Remarks
wx.scanCode 1.9.6

# Clipboard

API Minimum Version Remarks
wx.setClipboardData 1.9.6
wx.getClipboardData 1.9.6

# Bluetooth

# iBeacon

# Interactive Feedback

# Setting the Navigation Bar

API Minimum Version Remarks
wx.showNavigationBarLoading 2.1.0 Called only on plug-in pages
wx.hideNavigationBarLoading 2.1.0 Called only on plug-in pages
wx.setNavigationBarColor 2.1.0 Called only on plug-in pages
wx.setNavigationBarTitle 2.1.0 Called only on plug-in pages

# Background

API Minimum Version Remarks
wx.setBackgroundColor 2.4.0 Called only on plug-in pages
wx.setBackgroundTextStyle 2.4.0 Called only on plug-in pages

# WXML Node Information

API Minimum Version Remarks
wx.createSelectorQuery 1.9.6

# WXML Node Layout Intersection

API Minimum Version Remarks
wx.createIntersectionObserver 1.9.6
API Minimum Version Remarks
wx.navigateBack 2.1.0 Called only on plug-in pages
wx.navigateTo 2.2.2 Called only on plug-in pages
wx.redirectTo 2.2.2 Called only on plug-in pages
wx.switchTab 2.3.1 Called only on plug-in pages
wx.reLaunch 2.3.1 Called only on plug-in pages

# Animation

API Minimum Version Remarks
wx.createAnimation 1.9.6

# Location

API Minimum Version Remarks
wx.pageScrollTo 2.1.0 Called only on plug-in pages

# Drawing

# Pulling Down to Refresh

API Minimum Version Remarks
wx.stopPullDownRefresh 2.1.0 Called only on plug-in pages
wx.startPullDownRefresh 2.1.0 Called only on plug-in pages

# Current Account Information

API Minimum Version Remarks
wx.getAccountInfoSync 2.2.2

# Forwarding

API Minimum Version Remarks
wx.hideShareMenu 2.1.0 Called only on plug-in pages
wx.getShareInfo 2.1.0 Called only on plug-in pages
wx.showShareMenu 2.1.0 Called only on plug-in pages
wx.updateShareMenu 2.1.0 Called only on plug-in pages

# Other

API Minimum Version Remarks
wx.reportAnalytics 1.9.6 See the following remarks.

# Login and Obtaining User Information

These APIs are called only after user authorization is obtained from the feature page of user information. Otherwise, the calling failed. For details, see Feature Page of User Information.

API Minimum Version Remarks
wx.login 2.3.1
wx.getUserInfo 2.3.1

# Bugs & Tips