Authentication
Lowcoder comes with a feature-rich API, so you can use it in Lowcoder Apps or extend Lowcoder with new Functionality.
On api-service.lowcoder.cloud you can access this API as well, just some endpoints are not available.
Authentication
Session Cookie
In application properties of the API-Service - or as ENV Variable in Docker setups, you can set a name for the Cookie. In our ExamplesLOWCODER_CE_SELFHOST_TOKEN
With this value, you can then authenticate API Calls.
If no user is logged In, API Calls will get executed in the name of "Anonymous User" and for most of the API Calls, this user has no desired rights.
If you are logged in, the Cookie of the currently logged-in user will be used to make API Calls in the name of the current user. This means, that Access Rights to different Functions are automatically applied by the Role of the User. (Admin, Member, Visitor)
If you want to use the API from outside of Lowcoder, you need to authenticate first and use the Cookie as the LOWCODER_CE_SELFHOST_TOKEN
API key in every API Call.
When successfully logged in, you will get the following Response:
In particular, you will get back the Cookie to authorize the next API Calls.
For all the next API Calls you need to set the Cookie
API Key
Since Lowcoder v2.1.3 you can create and use alternatively also a JWT-based API Key.
As a logged-in user, you can use the API based on the Cookie to generate an API Key.
In return, you will get a JSON response containing the API key
For all further API Calls, you can then use the API Key, which impersonates the logged-in user, that created the API Key.
As the API Key impersonates the user, who created the API Key (based on the Cookie), all rights of that impersonated User are also active via API Key.
Last updated