Introduction Pro
To get started, the owner of an account must first generate an API key from the website: Settings > API > API Details
Rate Limit
Libib rate limits requests to the API. Currently you may hit the API once every 2 seconds.
In the basic sample code below, you would replace YOUR_API_KEY and YOUR_API_USER with the generated user id and API key from your account.
The code below doesn't do very much, but it will allow you to test the connection and confirm access.
bash
curl --location 'https://api.libib.com' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'x-api-user: YOUR_API_USER'php
<?php
$curl = curl_init("https://api.libib.com");
curl_setopt_array($curl, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_CONNECTTIMEOUT => 5,
CURLOPT_TIMEOUT => 15,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: YOUR_API_KEY",
"x-api-user: YOUR_API_USER"
],
]);
$response = curl_exec($curl);
curl_close($curl);
// Valid responses are always in JSON
$data = json_decode($response);python
import requests
url = "https://api.libib.com"
headers = {
'x-api-key': 'YOUR_API_KEY',
'x-api-user': 'YOUR_API_USER'
}
response = requests.get(url, headers=headers)
# Valid responses are always in JSON
data = response.json()Ultimate Accounts
If you are developing for Libib Ultimate with multiple accounts, there are slightly different authentication requirements, which are explained in detail on the Ultimate Dashboard API page.
You must include 3 x-api-* variables to authenticate:
| Header | Description |
|---|---|
x-api-ultimate | The ULTIMATE API ID |
x-api-key | The ULTIMATE API KEY |
x-api-user | The account API ID which you will be making changes to |