List Accounts: GET /accounts
Retrieve a list of account information. For Pro users this will only return one account. For our multi-account “Ultimate” users, this will return all accounts in their purview.
JSON Result Details
- organization: Name of the organization.
- api_id: The API ID for the account.
- email: The account owner email.
- first_name: The account owner’s first name.
- last_name: The account owner’s last name.
- manager_seats: The total number of managers the account has paid for.
- url: The account owner’s url alias.
- authorized: Indicates that the API ID for this user was used to access. Returns 1 if true.
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.libib.com/accounts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_CONNECTTIMEOUT => 5,
CURLOPT_TIMEOUT => 15,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"x-api-key: YOUR_API_KEY",
"x-api-user: YOUR_API_USER"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
$obj = json_decode($response);
}
{
"accounts": [
{
"organization": "My Organization Name",
"api_id": "q44f0eb130194c31e9081bcc2412a7fe0a5b47ab",
"email": "sriddell@example.com",
"first_name": "Sepideh",
"last_name": "Riddell",
"manager_seats": 10,
"url": "sr-library"
"authorized": 1
}
]
}