Authenticate

View as Markdown
[The API endpoint <code>https://localhost:8090/api/auth/authenticate</code>](https://localhost:8090//api/) is a POST request that is used to authenticate a user in the system. This endpoint accepts user credentials (such as username and password). It validates the credentials and, upon success, returns an authentication token along with basic user details. Use this endpoint to obtain a token for accessing protected API endpoints. ### Request - Method: POST - Base URL: [https://localhost:8090/](https://localhost:8090/) - Path: /api/auth/authenticate - Headers: - Content-Type: application/x-www-form-urlencoded ### Request Body The request body type is **`x-www-form-urlencoded`** - username (string)username is required - password (string): password is required ### Response • success (boolean ) Indicates whether the authentication request was successful . • message (string ) Message describing the result of the request . • data : - idst (integer ) Unique identifier (ID) of the user . userid (string ) Username of the authenticated user . - firstname (string ) First name of the user . - lastname (string ) Last name of the user . - avatar (string ) Filename of the user's avatar image . - email (string ) Email address of the user . - signature (string ) User’s signature . - valid (integer ) Indicates whether the account is valid (1 = valid, 0 = invalid) . - pwd_expire_at (datetime ) Timestamp when the password expires . - register_date (datetime ) Registration date of the user (Unix timestamp or string) . - last_enter (datetime ) Last login timestamp . - custom_fields (array ) Array of custom user fields; empty if none. • token (string ) Authentication token for API access . • expire_at (datetime ) Expiration timestamp of the token.

Request

This endpoint expects an object.
passwordstringRequired
tester password
usernamestringRequired
testusername

Response headers

Keep-Alivestring
X-Powered-Bystring

Response

OK
dataobject
tokenstring
messagestring
successboolean
expire_atstring