Admin Login

admin.auth.session.login

This API allows the admin to log in.

Endpoint

POST v1/admin/auth/login

HTTP Headers

Header Value
Authorization Bearer api_key.

Request Body

    {
        "username": "john.doe",
        "password": "abcd@1234",
        "extended_expiry" : False
    }
Parameter Type Requirement Description
username String Required Username of the admin user.
password Boolean Required Password of the admin user account.
extended_expiry Boolean Optional The extended_expiry field allows you to configure the
duration of the refresh_token. Every enterprise can be
configured to have a minimum expiration and a maximum
expiration of refresh token duration. This parameter allows
the client to specify that the token duration has to be
maximum as configured for the enterprise.

Response Body

    {
        "status_code": "A0000",
        "status_message": "success",
        "token": <str> #JWT,
        "refresh_token": <str> #JWT
    }
Field Type Description
status code String Status code provided by Indee.
status_message String Message body of the status code.
token String The auth token in OAuth 2.0 nomenclature.
refresh_token String The refresh token represents its namesake as defined in OAuth 2.0.
.

Common Error and Success Codes

The API response for authentication APIs follow the common status code format as outlined in the API Status codes.

Success Codes

Indee Status Code HTTP Status Code
A0000 200

Error Codes

Indee Status Code HTTP Status Code
A2001 401

Error Response

The error responses for all Auth APIs will follow the model as outlined in Indee Error codes.

    {
        "status_code": "A2002",
        "status_message": "Access Denied"
    }
The HTTP response codes will adhere to Indee Error codes.