Authentication
You need an API key to connect to the LMS. We can provide you with an API key, so you can start using the API. The API key is attached to a user.
Laravel example
use Illuminate\Support\Facades\Http;
public function boot()
{
Http::macro('lms', function () {
$token = config('services.lms.api_key');
$baseUrl = config('services.lms.base_url');
return Http::baseUrl($baseUrl)
->withHeaders([
'Authorization': "Bearer $token"
]);
});
}
Register API token (for system owners only)
Register a new API token
Login through SSH and navigate to the project.
Run
php artisan lms-connect:create-api-token
Search for a super admin and attach the API token
Write down the generated API token
Last modified: 27 December 2023