LiquidFiles Documentation
LiquidFiles Documentation

Authentication

The LiquidFiles API uses http basic authentication using API keys. You can view your API key by looking in your Account page on the LiquidFiles system. You will see something similar to this:

In this case, the users API key is: OhuHzkYns0z2vMsTb7CZhK. To authenticate to the LiquidFiles system, you use the API key as the username. The password doesn't matter. An example using curl would be:

curl --user OhuHzkYns0z2vMsTb7CZhK:x \
     -H "Accept: application/json" \
     https://liquidfiles.example.com/messages/inbox

Curl doesn't allow us to use an empty password so in this case we use the letter 'x' but we could have set anything as the only thing being looked at is the username as the API key. The relative url '/messages/inbox' will list all messages for the user with the API key: OhuHzkYns0z2vMsTb7CZhK.

Please note that the API key is persistent and won't change unless the user (or an admin) resets it.

HTTP Basic Authentication

If you want to manually create your own authentication header, if your language doesn't have support for adding http basic authentication in a simple way, the HTTP Header looks like:

Authorization: Basic Z1h2b3FhRnpkMWpZUTlmMTNzUE8wNjo=

Where Z1h2b3FhRnpkMWpZUTlmMTNzUE8wNjo= is Base64 encoded, created using something like:

Base64(gXvoqaFzd1jYQ9f13sPO06:)

Base64 in this case is a generic function and would need to be replaced by the equivalent command for your programming language of choice. Please note the colon at the end of the API key.

You can also test by entering an API key in the following field:

Resulting Authorization Header

Authorization: Basic Z1h2b3FhRnpkMWpZUTlmMTNzUE8wNjo=