Parameters
Success Callback Parameters
Scopes
Code Example
Related APIs
my.openSetting
Open the Mini App settings page
my.showAuthGuide
Guide users to grant permissions
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Obtain the user’s current Mini App permission settings.
| Property | Type | Required | Description |
|---|---|---|---|
| success | Function | No | Callback on success |
| fail | Function | No | Callback on failure |
| complete | Function | No | Callback that always executes |
| Property | Type | Description |
|---|---|---|
| authSetting | Object | Results of user authorization. Keys are the values of scopes and values are boolean types, which shows whether the user gives the permission or not. |
| Scope | API | Description |
|---|---|---|
| location | my.getLocation | Specifies whether to authorize access to geographic location. |
| album | my.chooseImage, my.saveImage | Specifies whether to authorize saving images to the album. |
| camera | my.scan | Specifies whether to authorize access to the camera. |
| phoneNumber | my.getPhoneNumber | Specifies whether to authorize access to the phone number. |
| userInfo | my.getOpenUserInfo | Specifies whether to authorize access to user information. |
my.getSetting({
success: (res) => {
console.log('Auth settings:', res.authSetting);
// Example: { location: true, camera: false, album: true, userInfo: true, phoneNumber: true }
if (res.authSetting['location']) {
// Location permission already granted
}
},
fail: (err) => {
console.error('Failed to get settings:', err);
}
});