> For the complete documentation index, see [llms.txt](https://docs.digitalturbine.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.digitalturbine.com/dt-fairbid/fairbid-sdk/sdk-reference/lgpd.md).

# LGPD

The Brazilian General Data Protection Law, the Lei Geral de Proteção de Dados Pessoais ([LGPD](https://www.gov.br/anpd/pt-br/centrais-de-conteudo/outros-documentos-e-publicacoes-institucionais/lgpd-en-lei-no-13-709-capa.pdf)), requires you to scope your user consent. The LGPD applies if any of the following is conditions are met:

* The user is currently located in Brazil.
* The user registers with the app as a Brazilian resident.
* The app specifically targets Brazilian users.

For more information about how DT applies LGDP, see [LGPD](/dt-fairbid/privacy/lgpd.md).

DT recommends that the first time you gather a user's consent, pass it to the DT FairBid SDK before initializing it. The SDK considers the user's consent when initializing. For future sessions, call the API if the user updates their consent, as the SDK caches the consent.

{% hint style="warning" %}
If you do not pass the user's consent to the DT FairBid SDK, the SDK only shows contextual ads to that user, which might negatively reduce your revenue.
{% endhint %}

## User Consent Given

To indicate that the user gives consent, use the following API:

{% tabs %}
{% tab title="Android" %}
{% code title="Java" %}

```java
UserInfo.setLgpdConsent(true, context);
      // true if you have the user’s consent
```

{% endcode %}
{% endtab %}

{% tab title="iOS" %}
{% code title="Swift" %}

```swift
FairBid.user().setLGPDConsent = true
```

{% endcode %}

{% code title="Objective-C" %}

```objective-c
[FairBid user].setLGPDConsent = true;
```

{% endcode %}
{% endtab %}

{% tab title="Unity" %}
{% code title="C#" %}

```csharp
UserInfo.SetLgpdConsent(true);
```

{% endcode %}
{% endtab %}
{% endtabs %}

## User Consent NOT Given

To indicate that the user does not give consent, use the following API:

{% tabs %}
{% tab title="Android" %}
{% code title="Java" %}

```java
UserInfo.setLgpdConsent(false, context);
      // false if you have the user’s consent
```

{% endcode %}
{% endtab %}

{% tab title="iOS" %}
{% code title="Swift" %}

```swift
FairBid.user().setLGPDConsent = false
```

{% endcode %}

{% code title="Objective-C" %}

```objective-c
[FairBid user].setLGPDConsent = false;
```

{% endcode %}
{% endtab %}

{% tab title="Unity" %}
{% code title="C#" %}

```csharp
UserInfo.SetLgpdConsent(false);
```

{% endcode %}
{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.digitalturbine.com/dt-fairbid/fairbid-sdk/sdk-reference/lgpd.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
