tencent cloud

Biometric Authentication
Last updated: 2025-09-01 15:26:13
Biometric Authentication
Last updated: 2025-09-01 15:26:13
Notes:
APIs related to biometric authentication are supported in mini programs but not in mini games.

checkIsSoterEnrolledInDevice

The API for checking biometric information is wx.checkIsSoterEnrolledInDevice(Object object).
Feature description:This API checks whether biometric information is entered into the device.
Parameter and description:Object object.
Property
Type
Default value
‍Required
Description
success
function
-
False
Callback function for successful API calls
fail
function
-
False
Callback function for failed API calls
complete
function
-
False
Callback function executed after API call ends (regardless of success or failure)
object.success callback function parameter:Object res.
Property
Type
Description
isEnrolled
boolean
Whether the information has been entered.
errMsg
string
Error message.
Example:
wx.checkIsSoterEnrolledInDevice({
success(res) {
console.log(res.isEnrolled)
}
})

checkIsSupportSoterAuthentication

The API for checking biometric authentication support is wx.checkIsSupportSoterAuthentication(Object object).
Feature description:This API checks whether the current device supports biometric authentication. If supported, the success callback is triggered; if not supported, the fail callback is triggered.
Parameter and description:Object object.
Property
Type
Default value
‍Required
Description
success
function
-
False
Callback function for successful API calls
fail
function
-
False
Callback function for failed API calls
complete
function
-
False
Callback function executed after API call ends (regardless of success or failure)
Example:
wx.checkIsSupportSoterAuthentication({
success() {
// Support biometric authentication
}
})

startSoterAuthentication

The API for starting biometric authentication is wx.startSoterAuthentication(Object object).
Feature description:This API starts the biometric authentication.
Parameter and description:Object object.
Property
Type
Default value
‍Required
Description
authContent
string
''
False
Verification description, i.e. the prompts displayed during the authentication
success
function
-
False
Callback function for successful API calls
fail
function
-
False
Callback function for failed API calls
complete
function
-
False
Callback function executed after API call ends (regardless of success or failure)
Example:
wx.startSoterAuthentication({
authContent: 'Unlock biometric authentication',
success() {
// Authentication successful
}
})

Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback