1. Who this guide is for
This guide explains how to get access to LibraCyber's REST APIs and how to authenticate your calls. It applies to all APIs in the How to use APIs and integrations (2.0) section: every article in that section refers here for authentication instructions.
You'll need someone from your IT team (or your integration partner) who can make HTTP calls from scripts, middleware, or integration platforms to follow this guide.
Your IT team or integration partner is responsible for automating the calls (scheduling, processing, and storing data): LibraCyber provides the data and supports you with its meaning.
In this guide, "LibraCyber" means LibraCyber or the partner managing your platform.
2. What you need before you start
The APIs need to be enabled on your platform. Submit a support request: once enabled, you'll receive four parameters.
| Parameter | What it is |
|---|---|
client_id |
Your API client identifier |
client_secret |
Your API client secret key, sent via a secure channel |
auth_base_url |
URL to obtain the token, provided by LibraCyber |
api_base_url |
Base URL for the APIs, provided by LibraCyber |
| ⚠️ |
Use exactly the URLs you receive from LibraCyber: don't try to build them yourself and don't copy them from other guides. Store the client_secret in a secure place (vault or secret manager) and never put it in your source code. |
3. Get an access token
Send a POST request to the auth_base_url, with these parameters in the body (application/x-www-form-urlencoded format):
-
client_id: the value you received -
client_secret: the value you received -
grant_type:client_credentials
curl -X POST "<auth_base_url>" \
-d "client_id=<client_id>" \
-d "client_secret=<client_secret>" \
-d "grant_type=client_credentials"The response will include the access_token field.
| 💡 | The token lasts 5 minutes. Request a new one at the start of each integration run, instead of saving it. |
4. Call the APIs
Add the token to every call, in the Authorization header with type Bearer:
curl "<api_base_url>/training/user-learning-paths" \
-H "Authorization: Bearer <access_token>"The token only works for calls to your api_base_url. In each API article, you'll find the path to add after api_base_url (for example, /training/user-learning-paths).
5. If something doesn't work
| Message | What it means | What to do |
|---|---|---|
EXT_1001 Unable to retrieve data. Token expired or not valid |
The token has expired or is not valid | Request a new token and try the call again |
| Error requesting the token | Incorrect credentials or URL | Check your client_id, client_secret, and auth_base_url
|
If the problem persists, contact support and include the API you called, the parameters used, the date and time of the call, and the full error message. Never include your client_secret in your support request.
6. Available APIs
- Training API: user-assigned learning paths
- Training API: completed content (generic LMS)
- Report API: user learning status
- Report API: user completion percentage
- Report API: user and team rankings
- Phishing API: campaign results
- Workday Integration: training completions
- SAP SuccessFactors Integration: training history
- Guide: integrating LibraCyber with an external LMS