Retrieve Static API key
If you want to retrieve the users static API key from your application, you can use the following API call. The static API key is persistent and won't change unless manually reset by the user or an admin.
Please note that even though we are using the users username and password to retrieve the static API key, we are not authenticating to the API using the users username and password. This is only to retrieve the API key. When you're saving the users credentials, don't save the username and password and call this request every time. Save the API key, this is why it's there.
Request
| Info | Value |
|---|---|
| Request URL | /login |
| Request VERB | POST |
| Parameter | Type | Description |
|---|---|---|
| String | The users email or username (how you would enter it on the web login screen) | |
| password | String | The users password |
You can use any string that the user normally logs in with on the login page of the LiquidFiles system. If you've setup LDAP integration and are also authenticating the users sAMAccountName, you can use the users shortname instead of the email.
Example Retrieve Static API key using Curl
curl -X POST \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"user":{"email":"user@company.com","password":"secret"}}' \
https://liquidfiles.company.com/login
{"user":{"api_key":"nkpIxMK9ucUUE7FvfNpdAf"}}