Skip to content

Authentication API Reference

AlgoTest Authentication API 1.0.0

Authentication endpoints for AlgoTest API. Handles user login and session management.


Servers

Description URL
Main API for Authentication https://api.algotest.in

Authentication


POST /login

Login

Description

Authenticate a user and obtain access tokens.

Input parameters

Parameter In Type Default Nullable Description
csrfHeader header string N/A No API key
cookieAuth cookie string N/A No API key

Request body

{
    "phoneNumber": "+919876543210",
    "password": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "type": "object",
    "properties": {
        "phoneNumber": {
            "type": "string",
            "description": "User's phone number",
            "example": "+919876543210"
        },
        "password": {
            "type": "string",
            "description": "User's password"
        }
    },
    "required": [
        "phoneNumber",
        "password"
    ]
}

Response 200 OK

{
    "success": true,
    "message": "Login successful"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "success": {
            "type": "boolean",
            "example": true
        },
        "message": {
            "type": "string",
            "example": "Login successful"
        }
    }
}

Response headers

Name Description Schema
Set-Cookie string

Response 400 Bad Request

{
    "success": true,
    "error": {
        "code": "string",
        "message": "string",
        "details": {}
    }
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "success": {
            "type": "boolean",
            "default": false
        },
        "error": {
            "type": "object",
            "properties": {
                "code": {
                    "type": "string"
                },
                "message": {
                    "type": "string"
                },
                "details": {
                    "type": "object"
                }
            }
        }
    }
}

Response 401 Unauthorized

{
    "success": true,
    "error": {
        "code": "string",
        "message": "string",
        "details": {}
    }
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "success": {
            "type": "boolean",
            "default": false
        },
        "error": {
            "type": "object",
            "properties": {
                "code": {
                    "type": "string"
                },
                "message": {
                    "type": "string"
                },
                "details": {
                    "type": "object"
                }
            }
        }
    }
}

Security schemes

Name Type Scheme Description
cookieAuth apiKey
csrfHeader apiKey

Tags

Name Description
Authentication User authentication and session management