All Products
Search
Document Center

SuperApp:wv.getSetting

Last Updated:Jun 02, 2026

Gets the user's authorization status for the current miniapp. Use with wv.authorize.

Request parameters

Parameter

Type

Required

Description

success

Function

No

Callback on success.

fail

Function

No

Callback on failure.

Response parameters

The success callback receives an object with the user's authorization settings.

Parameter

Type

Description

authSetting

Object

Authorization results. Keys are permission scopes; boolean values indicate whether each permission is granted.

Properties of authSetting:

Parameter

Type

Description

location

Boolean

Authorization status for location. false means not granted. Related: WVLocation.getLocation and WVLocation.searchLocation.

camera

Boolean

Authorization status for camera. false means not granted. Related: WVScan.scan.

bluetooth

Boolean

Authorization status for Bluetooth. false means not granted. Related: All methods in WVBluetooth.

album

Boolean

Authorization status for album. false means not granted. Related: WVVideo.chooseVideo and WVCamera.takePhoto.

contacts

Boolean

Authorization status for contacts. false means not granted. Related: All methods in WVContacts.

microphone

Boolean

Authorization status for microphone. false means not granted. Related: WVMotion.listenBlow and WVMotion.stopListenBlow.

file

Boolean

Authorization status for file access. false means not granted. Related: all methods in WVFile, WVVideo.saveVideoToPhotosAlbum, and WVImage.saveImage.

call

Boolean

Authorization status for calls. false means not granted. Related: WVCall.dial and WVCall.call.

vibrate

Boolean

Authorization status for vibration. false means not granted. Related: WVMotion.vibrate.

screen

Boolean

Authorization status for screen capture. false means not granted. Related: WVScreenCapture.capture.

On failure, the fail callback receives an object with error details.

Error message

Description

Solution

You need to configure the authorization switch to apply for authorization

Authorization switch not enabled.

Configure the authorization switch during container initialization.

User not bound

User ID not registered with the container.

Pass the user ID when registering the user with the container.

Sample code

window.WindVane.call('wv', 'getSetting', {}, function(res) {
    const { camera = false, location = false } = res.authSetting;
}, function(e) {
    alert('failure:' + JSON.stringify(e));
});