Skip to content

Accounts Pro

GET /accounts

Retrieve a list of account information. For Pro users this will only return one account. For multi-account "Ultimate" users, this will return all accounts in their purview.

bash
curl --location 'https://api.libib.com/accounts' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'x-api-user: YOUR_API_USER'
php
<?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);
curl_close($curl);

// Valid responses are always in JSON
$data = json_decode($response);
python
import requests

url = "https://api.libib.com/accounts"

headers = {
  'x-api-key': 'YOUR_API_KEY',
  'x-api-user': 'YOUR_API_USER',
}

response = requests.request("GET", url, headers=headers)

data = response.json()

JSON Result Details

accounts is the parent label.

FieldDescription
organizationName of the organization.
api_idThe API USER ID for the account.
emailThe account owner email.
first_nameThe account owner's first name.
last_nameThe account owner's last name.
manager_seatsThe total number of managers the account has paid for.
urlThe account owner's url alias.
authorizedIndicates that the API ID for this user was used to access. Returns 1 if true.
json
{
  "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
    }
  ]
}