wx.miniapp.bindWeixin

View Markdown

Last edited on 2026-07-14

iOS >= 1.0.9, Android >= 1.0.5

During the system login session, invoke the interface to launch the user's WeChat app for WeChat account binding.

Parameters

Object object

Attribute Type Default Value Required Description
success function No Callback function when the API call succeeds
fail function No Callback function when the API call fails
complete function No Callback function when the API call ends

object.fail Callback Function

Parameters
Object res
Property Type Description
errCode number Error code
errMsg string Error message

res.errCode

errCode Description
-1 System error
10001011 Invalid system login state
10001036 WeChat already exists; binding failed
-700000 Frontend error; errMsg will provide detailed information

Sample Code

wx.miniapp.bindWeixin({
	success(res) {
		// Binding successful	
	}
})