# Handling Files For Authentication

As part of the authentication options, Aikido provides the possibility to upload files and facilitate more complex authentication flows.

**Use this feature if your application requires:**

* **Predefined files:** Your application uses predefined files as part of f.e. KYC authentication flows
* **Certificates:** Your api requires signing of the API requests based on certificates
* **Code scripts:** Your api uses complex authentication mechanisms for which you can provide a python script
* **GraphQL Trusted Documents:** Your application whitelists access based on Trusted Documents
* **Other complex login flows requiring files**

{% stepper %}
{% step %}
**Add a test user**

Start the flow for adding the authentication instructions and select the document option.

<figure><img src="/files/fdw6mARpQ22U66Aogx8t" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Add the instructions**

Add the instructions of how the agents should use the file provided in the next step
{% endstep %}

{% step %}
**Upload the file**

Upload the file in the authentication instructions.

<figure><img src="/files/er5NxKBwlSTuXeB0DuNm" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Validate**

Finally, verify that the agent can interpret your instructions:

1. Click **Save & Test**.
2. The agent will launch a session and attempt to log in using the credentials and file upload
3. If successful, you will see a confirmation that the agent authenticated and reached the post-login state.

<figure><img src="/files/4xEvoIGCkfqvXpWajU9t" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}


---

# 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://help.aikido.dev/pentests/configure-a-pentest/setting-up-authenticated-testing/handling-files-for-authentication.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.
