AIHR API Authentication
Authentication is the most important step before you can interact with the AIHR API.
AIHR provides API key authentication method to help our partners establish a fast and secure communication to access our resources.
Prerequisites
Section titled “Prerequisites”- You need to have an active AIHR license
- You need to get an API key. Reach out to your AIHR contact or AIHR Support for more details.
How It Works
Section titled “How It Works”To authenticate with an API key, add a header named X-AIHR-API-Key to your request and set its value to your API key.
Example Request:
curl https://prod.burnwood.aihr.com/lms/external/api/v1/learningcatalog/search \ --header 'X-AIHR-API-Key: YOUR_API_KEY'
Or using JavaScript:
fetch( "https://prod.burnwood.aihr.com/lms/external/api/v1/learningcatalog/search", { headers: { "X-AIHR-API-Key": "YOUR_API_KEY", }, });
For all endpoints, you can find the required header in Scalar. This means the endpoint expects you to provide a valid API key.
Security Best Practices
Section titled “Security Best Practices”- Store API keys and tokens in environment variables or secure vaults.
- Never commit your API key to version control.