This chapter describes how to authenticate with the Lucidum API v2. The steps are:
-
Generate a bearer token
-
Include the bearer token in the header of each API request
Generating a Bearer Token #
To authenticate with the Lucidum API v2, use a bearer token. The bearer token allows a Lucidum account to access the Lucidum API. You can generate the bearer token from the Lucidum UI.
Lucidum does not support SSO access for the Lucidum API.
To generate the Token:
-
Go to Settings > User Management.
-
Find your account. Click its Edit link.
-
Ensure that your account is assigned the Role Api_Users.
-
In the Edit User page, in the Roles field, click API_Users and click the right arrow button.
-
In the Edit User page, click the button Generate ClientID/Secret.
-
Double-click on the Client ID field to copy the value. Save it somewhere safe.
-
Double-click on the Secret field to copy the value. Save it somewhere safe.
-
Click the button Generate Token.
-
Double-click on the Token field to copy the value. Save it somewhere safe. Lucidum will not display this value again.
-
Click the Confirm button.
Authentication in the Header #
To authenticate with the Lucidum API v2, include the bearer token in the header of each API request.
In Python, the header looks like this:
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer quoVnYQeDNicAOywkOKq'
}
In cURL the header looks like this:
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer quoVnYQeDNicAOywkOKq'
where:
-
quoVnYQeDNicAOywkOKq
is the bearer Token we generated in the Edit User page. -
Content-Type is JSON.