# Key changes in the new Unity Ads privacy API

> This guide explains how LevelPlay mediation users and direct Unity Ads integrations can upgrade to the new beta privacy APIs, outlining the API changes and which new beta APIs to use.

> **Note:**
>
> The current version of the Unity Ads SDK privacy API is in a beta release. The features and documentation might change between now and the next release.

Unity Ads SDK 4.17.0 introduces new public privacy APIs in beta, currently used only through the LevelPlay mediation adapter. This guide is for developers integrating Unity Ads SDK 4.17.0 directly with the LevelPlay mediation adapter.

## Upgrade to Unity Ads SDK 4.17.0

1. **LevelPlay mediation users**

   If you’re a LevelPlay mediation user using the LevelPlay mediation adapter, all privacy and consent handling is managed directly through the adapter. The recommended best practice is to review and follow the LevelPlay privacy regulation advanced settings documentation for your platform ([Android](/grow/levelplay/sdk/android/regulation-advanced-settings.md), [iOS](/grow/levelplay/sdk/ios/regulation-advanced-settings.md), [Unity](/grow/levelplay/sdk/unity/regulation-advanced-settings.md), [Adobe Air](/grow/levelplay/sdk/adobe/additional-settings.md), [Flutter](/grow/levelplay/sdk/flutter/regulation-advanced-settings.md), or [React Native](/grow/levelplay/sdk/react/regulation-advanced-settings.md)).

   If your integration [correctly sets consent flags](set-consent-signal-mappings) in the appropriate scenarios, no further action from you is needed.

2. **Direct Unity Ads integrations using Metadata APIs**

   If your integration uses the Unity Ads Metadata APIs, Unity Consent (Unity’s default fallback privacy solution), or a combination of both, you must set the correct consent signals in your mediation SDK.

   If you don’t complete this action, your consent signals risk being ignored. This means your app might not follow your users' privacy choices.

> **Important:**
>
> As of SDK version 4.17.0, the beta Privacy API enforces one authoritative signal per privacy framework, either the opt-in consent signal `setUserConsent` for opt-in privacy frameworks or the opt-out signal `setUserOptOut` for opt-out privacy frameworks. Refer to [Set the correct consent signal mappings](set-consent-signal-mappings) to see which method is appropriate for which privacy framework. Signals from the non‑applicable API are not applied and the framework’s default behavior remains in effect.
>
> It’s your responsibility to ensure you have reviewed and fulfilled the [Prerequisite conditions](prerequisite-conditions) and using the latest version of the Unity Ads SDK when enabling developer consent.

## What’s changing

Review the following table to determine which Metadata privacy API methods you must update to use the new beta privacy API.

| **Former privacy API**     | **New privacy API to use instead** | **Description**                                                                                           |
| -------------------------- | ---------------------------------- | --------------------------------------------------------------------------------------------------------- |
| `gdpr.consent`             | `setUserConsent`                   | Covers consent for [opt-in frameworks](use-beta-privacy-apis#opt-in-consent-api).                         |
| `privacy.consent`          | `setUserOptOut`                    | Covers consent for [opt-out frameworks](use-beta-privacy-apis#opt-out-signal-api).                        |
| `user.nonbehavioral`       | `setNonBehavioral`                 | Covers consent for [age-restricted frameworks](use-beta-privacy-apis#age-restricted-users-specification). |
| `pipl.consent`             | Not applicable.                    | Deprecated API, should be removed.                                                                        |
| `privacy.useroveragelimit` | Not applicable.                    | Deprecated API, should be removed.                                                                        |

Refer to [Use the new beta privacy APIs](use-beta-privacy-apis) on guidance for implementation.
