> For the complete documentation index, see [llms.txt](https://dupr.gitbook.io/dupr-raas/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dupr.gitbook.io/dupr-raas/integration-checklist/user-gating.md).

# User Gating

## Fetching User Entitlements

To gatekeep specific features, you must fetch a user's entitlements using the User Access Token obtained during the [SSO Login](/dupr-raas/integration-checklist/sso-login.md) flow.

<table><thead><tr><th width="186">Environment</th><th>API</th></tr></thead><tbody><tr><td>UAT</td><td><a href="https://api.uat.dupr.gg/api-explorer?group=public#/Subscriptions%20Controller/getSubscriptions">UAT: Fetch User Entitlements</a></td></tr><tr><td>Production</td><td><a href="https://api.dupr.gg/api-explorer?group=public#/Subscriptions%20Controller/getSubscriptions">Prod: Fetch User Entitlements</a></td></tr></tbody></table>

{% hint style="success" %}
**Caching:** You may cache a user's entitlements for up to **24 hours** to avoid redundant API calls when a user performs multiple actions within a single day. After 24 hours, you must re-fetch the user's entitlements to ensure they reflect the most current subscription state.
{% endhint %}

Example Response Object:

```json
{ 
   "status": "", // Deprecated
   "displayName": "DUPR LLC",
   "entitlements": {
      "tournaments": [
        "BASIC_L1", "VERIFIED_L1", "PREMIUM_L1"
      ],
      "merchandise": [
        "PREMIUM_L1"
      ]
   }
}
```

***

## Understanding User Entitlements

Entitlements define what a user is eligible for within a specific resource.

<table><thead><tr><th width="321">Entitlement</th><th>Description</th></tr></thead><tbody><tr><td><code>BASIC_L1</code></td><td><strong>Mandatory Requirement:</strong> Indicates this user is eligible for the basic tier of a resource. Its absence indicates the user is restricted or banned.</td></tr><tr><td><code>PREMIUM_L1</code></td><td>Indicates eligibility for the premium tier (e.g. DUPR+ restricted tournaments).</td></tr><tr><td><code>VERIFIED_L1</code></td><td>Indicates the user is eligible for resources requiring identity verification.</td></tr></tbody></table>

***

## Platform Requirements

To maintain a full integration status, your platform must support the following gating logic:

1. **The Baseline Requirement**

{% hint style="danger" %}
A user must have the `BASIC_L1` entitlement to perform any actions on the platform. If this entitlement is missing from the response, the user should be treated as restricted or unauthorized for play.
{% endhint %}

2. **Premium Event Support**\
   \
   It is a requirement for partner platforms to provide the option for Premium Events.\
   \
   **Logic:** When creating or managing events, your system must check for the `PREMIUM_L1` entitlement.\
   \
   **Restriction:** If designated as a Premium event (e.g., DUPR+ only), users without the `PREMIUM_L1` tag must be prevented from registering or participating.

***

## Understanding Resources

Resources are the categories of play or features that entitlements apply to. Each key in the `entitlements` map is a resource, and its value is the list of entitlements the user holds for that resource.

<table><thead><tr><th width="321">Resource</th><th>Description</th></tr></thead><tbody><tr><td><code>tournaments</code></td><td>Organized, rated events. Covers leagues and tournaments, but not necessarily other events, such as open play.</td></tr><tr><td><code>merchandise</code></td><td>Discounts and offers on DUPR merchandise. A user carrying <code>PREMIUM_L1</code> is eligible for member merchandise pricing; an empty list means standard pricing.</td></tr></tbody></table>

{% hint style="info" %}
`tournaments` and `merchandise` are the resources currently in use. New resources may be added over time — treat any unrecognized resource key as informational and ignore it, rather than failing.
{% endhint %}

***

## Testing Premium & Verified Users in UAT

To test `PREMIUM_L1` and `VERIFIED_L1` entitlements in UAT, you must complete the DUPR+ signup flow using a Stripe test card.

#### Steps

1. Complete the [SSO Login](/dupr-raas/integration-checklist/sso-login.md) flow in UAT. After linking their account, eligible users will see the following screen:

<figure><img src="/files/IF3mHilzVLdrfta8i9mj" alt=""><figcaption></figcaption></figure>

2. Click **Try DUPR+ Free** and complete the DUPR+ signup process.
3. When prompted for payment, use a [Stripe test card](https://docs.stripe.com/testing#cards) to complete the transaction.
4. Once the signup is complete, the user's entitlements will include `PREMIUM_L1` and `VERIFIED_L1`.
