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

# Get referral settings

> `Smile.referralSettings.get()`

This async method retrieves the configuration for the account's referral program. This method always makes an API call to fetch the latest data.

> [!TIP]
>
> For the best performance, we suggest [preloading](https://dev.smile.io/js/concepts/preloading.md) referral settings and then using the [`Smile.referralSettings.preloaded()`](https://dev.smile.io/js/resources/referral-settings/preloaded) method.

## Returns

This method returns a `Promise` that:

* On success, resolves with either a [referral settings object](https://dev.smile.io/js/resources/referral-settings/object.md) or `null` if there is no active referral program.
* On failure, rejects with an [error object](https://dev.smile.io/js/concepts/error-handling.md).

If the method is improperly invoked, the `Promise` will be rejected.

```javascript JavaScript lines theme={null}
Smile.referralSettings.get().then(
  (referralSettings) => {
    if (referralSettings) {
      // Handle the referral settings object
    } else {
      // No active referral program
    }
  }
);
```
