# Data export
___

Exporting reports allows you to consolidate, enrich, and analyze data within your systems for deeper insights. Infobip enables secure data exchange between its platform and your systems through the **Export** option. Once configured, reports are automatically uploaded to your specified destination after generation, including scheduled recurring reports.
___

## Configuring data export

1. In the [web interface](https://portal.infobip.com/login), navigate to **Analyze** > **Export**.

2. Select **Create configuration**.

3. Choose the destination type:

    - **SFTP**: Infobip strongly recommends using **SFTP** to ensure a high standard of security.
    - **FTP**: While FTP is supported, the **FTP active mode is not available** because it must pass through NAT and proxy.

    NOTE
    Restrict the IP addresses allowed to connect to your FTP/SFTP server to enhance security. Infobip recommends configuring your firewall to block all connections by default and permit only the following IP addresses: - 193.105.74.4 - 62.140.31.104

4. Select the **authentication type**:

    - **Password**: Use this method for simplicity or when supporting legacy systems that do not accommodate more secure authentication methods like public keys.
    - **Public key**: Use this authentication method to eliminate password-based access, providing stronger security.

### Setting up public key authentication [#setting-up-public-key-authentication-configuring-data-export]

Public key authentication provides a more secure alternative to password-based access by using cryptographic key pairs. This method enhances authentication strength and resists brute force attacks, as it eliminates the need for passwords entirely. By setting up public key authentication, you can safeguard your system with stronger, more reliable security measures.

To set up public key authentication for data export, follow these steps:

1. Select **public key authentication**.
    - When creating your configuration, choose **Public key** as the authentication type. Infobip provides a shared public key for secure communication.

2. **Copy the public key** displayed in the interface.

3. **Configure your server** to accept the public key:

    - Log into your server where the reports will be received.
    - Navigate to the `.ssh` directory.
    - Open (or create) the `authorized_keys` file.
    - Paste Infobip's public key into the `authorized_keys` file and save it.
    - Ensure correct permissions on the `.ssh` directory and the `authorized_keys` file.

5. Enter the **required destination details**.

    - In the web interface, provide the required information such as **hostname or IP address**, **port**, **username**, and **remote path**.

6. Name the configuration.

    - Assign a name to the configuration and select **Save**.

7. Validate the connection.

    - If the connection is successful, a green OK status will appear next to your configuration on the [All export configurations](https://portal.infobip.com/analyze/exports) page.
    - If there is an error, a red ERROR status will appear. Hover over the error for more details.
___

## Automating report export

To enable automated export, assign the configuration during report creation:

1. On the [Create report](analyze/reports/create) page, navigate to the **Options** section.
2. Select your configuration from the drop-down menu under **Export Report**.

Once configured, reports are automatically uploaded to your server after generation. This includes both one-time and recurring reports. After the upload, you can import the reports into your system or process them further as machine-friendly data.

For more details about creating and managing reports, refer to the [Reports](https://www.infobip.com/docs/reports) page.
___