Skip to main content
Returns the user’s current authorization settings for the Mini App — which permissions have been granted and which have been denied.

Parameters

PropertyTypeRequiredDescription
successFunctionNoCallback on success
failFunctionNoCallback on failure
completeFunctionNoCallback that always executes

Success Callback Parameters

PropertyTypeDescription
authSettingObjectMap of permission scope keys to their granted status (true/false)

Code Example

my.getSetting({
  success: (res) => {
    console.log('Auth settings:', res.authSetting);
    // Example: { 'scope.userLocation': true, 'scope.camera': false }
    if (res.authSetting['scope.userLocation']) {
      // Location permission already granted
    }
  },
  fail: (err) => {
    console.error('Failed to get settings:', err);
  }
});

my.openSetting

Open the Mini App settings page

my.showAuthGuide

Guide users to grant permissions