Auth
Last updated
We do not use JWT as in the Client section to identify the administrator. We use the username, password and API key that we specify in the .env file. After the client logs in, each request will have an API-KEY added to the headers object.
ADMIN_USERNAME=Enclaive
ADMIN_PASSWORD=Qw23K#D(#ke3
API_KEY=Mn3dcrNYNXswd332GSFVeq
APP_ADMIN_URL=It is important to note that in the APP_ADMIN_URL field you must enter the URL where the admin dashboard is located. If the request comes from a different URL, the response will be an error with status 404 Not Found.
POST {{BASE_URL}}/admin/api/auth/login
Admin authentication via email and password fields.
id*
String
App ID
username*
String
password*
String
{"apiKey":"MWGCcrWxNXsvdxExcHYGGSFVRsnq"}GET {{BASE_URL}}/admin/api/auth/profile
Get an administrator profile.
Api-Key*
String
Admin api key
Last updated
{"username":"Enclaive","role":"Admin"}