# Sanitization

Sanitization protects sensitive data (passwords, secret keys, etc.) from leakage.

You should always [sanitize the log](/custom-apps-documentation/component-blocks/api/making-requests.md#log) so no personal tokens and/or keys are leaked.

If you don't use sanitization, the request and response logs will not be available in the [console](/custom-apps-documentation/debug-your-app/make-devtool.md).

{% tabs %}
{% tab title="With correct sanitization" %}

<div align="left"><img src="/files/5lgnzl56PjBDhvdsNNkb" alt="Example of a log from the console with a sanitized access token" width="418"></div>

```json
...
"log": {
        "sanitize": ["request.headers.accesstoken"]
    }
...
```

{% hint style="info" %}
`Accesstoken` is correctly mapped, so it's not exposed.
{% endhint %}
{% endtab %}

{% tab title="Without sanitization" %}

<div align="left"><img src="/files/RAktuPpIrGSJvDjC2zzF" alt="Output from the Scenario Debugger" width="277"></div>

{% hint style="info" %}
Without sanitization, there isn't a log in the list of executions in Live Stream.

Additionally there will be no shown log in the Scenario Debugger, as shown in the screenshot above.

Neither the developer nor user can see the original request and respond to debug possible issues.
{% endhint %}
{% endtab %}

{% tab title="With incorrect sanitization" %}

<div align="left"><img src="/files/dEn2XcJI8yLbWdQXMK6e" alt="Example of a log from the console with an exposed access token" width="418"></div>

```json
...
"log": {
        "sanitize": ["request.headers.token"]
    }
...
```

{% hint style="info" %}
Notice, the `accesstoken` was mistaken for `token`. Therefore the `accesstoken` was exposed in the log.
{% endhint %}
{% endtab %}
{% endtabs %}


---

# Agent Instructions: 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:

```
GET https://developers.make.com/custom-apps-documentation/app-components/base/sanitization.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
