API Authentication


Login

Endpoint

Method URI Headers
POST /api/login Default

Body Params

{
    "email": "string|email",
    "password": "string",
    "device_name": "string"
}

{info} Login request example

{
    "email": "admin@test.com",
    "password": "admin123",
    "device_name": "iPhone 15 Pro Max"
}

curl example

curl --location 'https://finance-demo.saleem.dev/api/login' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
    "email": "admin@test.com",
    "password": "admin123",
    "device_name": "iPhone 15 Pro Max"
}'

{danger} Error Response

{
    "message": "The provided credentials are incorrect.",
    "errors": {
        "email": [
            "The provided credentials are incorrect."
        ]
    }
}

{success} Success Response (the token)

string

You can use this token to authenticate your upcoming requests. You can pass this token in the Authorization header as a Bearer token.