How to import CSV data protected with a simple authentication?
A CSV data flow setup for importing a protected CSV file depends on the authentication method. The most common ones include:
Basic authentication
The authorization header that has to be entered in the " Request headers" field looks as follows:
Authorization: Basic Q291cGxlcjoxMjM0NTY=
Authorization: Basic {base64-encoded-string}
{base64-encoded-string} is a string of your credentials (username:password) encoded to Base64.
To get encoded string using your credentials, follow these steps:
- Define your username and password (the data you are using to log in to the system you want to integrate with).
Build {your-username}:{your-password} string -> for example:
my username: daria.qa@gmail.com, my password: Qwerty1! So the result string will be -> daria.qa@gmail.com:Qwerty1! (use your credentials)
Copy this string and paste it to the base64 converter - for example, https://www.base64encode.net/, and click ENCODE:
Copy the received value:
- Paste it to the data flow settings:
Authentication with query parameters
When setting up your CSV data flow, add your credentials to the "URL query string" field in the following format:
username: {insert-your-username} password: {insert-your-password}
In this case, you don't need to encode your credentials.
Authentication with the credentials embedded in the URL
Embedding credentials in the URL is not supported by most browsers, but it may be your case.
https://username:password@www.example.com/your-file.csv