Getting started
Prerequisites
Before you begin, ensure you have:
-
Username and password
-
cURL or an HTTP client installed
-
Basic knowledge of REST APIs
Get a user token
JWT token request
curl --request POST \
--url https://auth.ai-dapt.s5projects.eu/realms/ai-dapt/protocol/openid-connect/token \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data client_id=main \
--data username=[username] \
--data 'password=[password] \
--data grant_type=password \
--data client_secret=MFSrSsOiQBY7gwXD7SEkSRLlnBn2IjpJ
Make a request
curl --request GET \
--url http://example.com/user \
--header 'Authorization: Bearer [userToken]'
Error Handling
Common HTTP status codes:
-
200 OK- Request succeeded -
400 Bad Request- Invalid parameters -
401 Unauthorized- Invalid or missing API key -
429 Too Many Requests- Rate limit exceeded -
500 Internal Server Error- Server error