# 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="https://3149773201-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyKbzcQGrx7UtrG0nPZZ7%2Fuploads%2Fr5M7GGCjAWr2CpHPo223%2Fimage.png?alt=media&#x26;token=e2b6dcc6-8a4a-46e6-b2dd-479d2531cccf" 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="https://3149773201-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyKbzcQGrx7UtrG0nPZZ7%2Fuploads%2Fj7CHdAVvAyikYZGVfdLm%2Fimage.png?alt=media&#x26;token=8a1904ca-c736-4e03-9de1-ca314f0938b0" 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="https://3149773201-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyKbzcQGrx7UtrG0nPZZ7%2Fuploads%2FauxuucOxksQiWZm4dFJN%2Fimage.png?alt=media&#x26;token=67e30f25-989b-4dc9-ae46-a5ee01e5204c" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}
