---
metadata:
  - name: generator
    content: Diplodoc Platform v5.50.6
alternate:
  - https://ads.yandex.com/helpcenter/en/dev/android7/tcf-2-0.md
  - https://ads.yandex.com/helpcenter/ru/dev/android7/tcf-2-0.md
---
> **Documentation Index:** Fetch the complete configuration index at https://ads.yandex.com/helpcenter/en/llms.txt

# TCF v2.0 Consent



If you implemented a consent management platform (CMP) that complies with the IAB [Transparency & Consent Framework](https://iabeurope.eu/tcf-2-0/) v2.0 (TCF) for the user consent flow, the Yandex Mobile Ads SDK supports sending TCF v2.0 values.

Yandex Mobile Ads SDK retrieves TCF v2.0 consent strings from `SharedPreferences` using the following keys:

#|
|| `IABTCF_TCString` | String | Fully encoded TC string. ||
|| `IABTCF_gdprApplies` | Number |
* 1: GDPR applies in the current context.
* 0: GDPR doesn't apply in the current context.
* Unset: Unknown (default before initialization). ||
   || `IABTCF_CmpSdkID` | Number | Unsigned integer `ID` of the certified CMP used. ||
   || `IABTCF_PurposeConsents` | Binary String | "0" or "1" at position n, where n's indexing begins at 0. Indicates the consent status for purpose `ID` n+1. 0 corresponds to `false`, and 1 corresponds to `true`. For example, "1" at index "0" is consent true for purpose `ID` 1. ||
   || `IABTCF_VendorConsents` | Binary String | "0" or "1" at position n, where n's indexing begins at 0. Indicates the consent status for vendor `ID` n+1. 0 corresponds to `false`, and 1 corresponds to `true`. For example, "1" at index 0 is consent true for vendor `ID` 1. ||
   || `IABTCF_AddtlConsent` | String | AC string with the specification version and IDs of ad technology providers consented by the user. ||
   |#

For a detailed description, see the [IAB documentation](https://github.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework/blob/master/TCFv2/IAB%20Tech%20Lab%20-%20CMP%20API%20v2.md).

## Passing values to SharedPreferences

Make sure to set required key values before making ad requests and use certified CMPs. See the up-to-date CMP list compliant with IAB Europe recommendations [here](https://iabeurope.eu/cmp-list). Once the user's consent is obtained, the CMP writes all data to `SharedPreferences` by keys, while the Yandex Mobile Ads SDK automatically reads the data.
