> For the complete documentation index, see [llms.txt](https://lionstudios.gitbook.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lionstudios.gitbook.io/readme/third-party-sdks/max-sdk/max-consent-flow.md).

# Max Consent Flow

The MAX SDK features an automatic consent flow that determines if a user needs to see the consent popup and displays it as needed.

### Setup

1. Ensure your game does not show additional Privacy, Terms of Use, GDPR, or ATT popups to avoid duplicate requests for users.
2. In Applovin Integration Manager settings, enable "Enable MAX Terms and Privacy Policy Flow" settings

<figure><img src="/files/snnqTCDulXqNhvEM2TU3" alt="" width="375"><figcaption></figcaption></figure>

3. You must have `Google Ad Manager` and `Google AdMob` adapters installed and the keys setup. Ask your manager for these keys

<figure><img src="/files/Ia8dXlVXtJOELl0y6mzC" alt="" width="375"><figcaption></figcaption></figure>

4. Max SDK will automatically handle showing the consent flow on its own after this setup

<img src="/files/KdxUBPGQfoa4XvT3Pn68" alt="" width="375">

{% hint style="info" %}
On android, the flow differs since there is no ATT framework. Instead, it is just the Terms/Privacy prompt using the native dialog box design in non-GDPR regions; and the GDPR prompt with the 3 toggles in GDPR regions.
{% endhint %}

***

### Privacy Button

Games **must** include a "Privacy" button that lets users reopen the Consent Flow screen.

Below is an example of how to call it using a MaxSDK method call

```
MaxSdk.CmpService.ShowCmpForExistingUser((error) =>
{
    if (error != null)
    {
        
        Application.OpenURL("https://lionstudios.cc/privacy/");
        Debug.Log("Issue showing consent window");
    }
    else
    {
        Debug.Log("Max Consent Showing");
    }
});
```


---

# 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://lionstudios.gitbook.io/readme/third-party-sdks/max-sdk/max-consent-flow.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.
