Authentication is required to access the LendAPI platform. In this section, we will explain how to authenticate your requests using a bearer token in the HTTP header.
Bearer token authentication is a widely used authentication method that involves including a token in the Authorization header of your API requests. Here's how you can authenticate your requests:
Obtaining an API Key:
LendAPI provides both live and test environments for API integration. To facilitate testing and development, separate API keys are used for each environment. These keys have distinct prefixes: live_
for live environment API keys and test_
for test environment API keys
To authenticate with the LendAPI, you need to obtain an API key. This key will serve as your bearer token for authentication purposes. Click here to know how to create your API Key
Including the Bearer Token:
In your API requests, include the API key in the Authorization header using the Bearer scheme. Here's an example:
AUTHORIZATION: Bearer your_api_key
Verifying Authentication:
The LendAPI will validate the bearer token in the Authorization header for each request. If the token is valid, the request will be processed successfully. If the token is invalid or missing, you will receive an appropriate error response.
It is essential to keep your API key secure and avoid sharing it publicly. Treat your API key like a password and ensure it is stored securely.
By following these steps and including the bearer token in the Authorization header of your API requests, you can successfully authenticate your requests to the LendAPI servers and access the desired endpoints and functionalities.