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.
// use the Lowcoder API to generate the JWT based API Key
curl --location '<your lowcoder location>/api/auth/api-key' \
--header 'cookie: LOWCODER_CE_SELFHOST_TOKEN=<generatedCookieValue>;' \
--header 'Content-Type: application/json' \
--data '{
"name":"<your api key name>",
"description": "A wonderful API Key"
}'