> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rebellapp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# my.getSetting

> Obtain the user's current Mini App permission settings.

Use this API to obtain the user's current settings. Only the permissions that have been requested by the Mini Program from the user are returned.

## Parameters

| Property | Type     | Required | Description                   |
| -------- | -------- | -------- | ----------------------------- |
| success  | Function | No       | Callback on success           |
| fail     | Function | No       | Callback on failure           |
| complete | Function | No       | Callback that always executes |

## Success Callback Parameters

| 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. |

## Scopes

| 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.    |

## Code Example

```javascript theme={null}
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);
  }
});
```

## Related APIs

<CardGroup cols={2}>
  <Card title="my.openSetting" icon="gear" href="/jsapi/device/setting/my.openSetting">
    Open the Mini App settings page
  </Card>

  <Card title="my.showAuthGuide" icon="shield-halved" href="/jsapi/device/permission-guide/my.showAuthGuide">
    Guide users to grant permissions
  </Card>
</CardGroup>
