Authentication API Reference
AlgoTest Authentication API 1.0.0
Authentication endpoints for AlgoTest API. Handles user login and session management.
Contact: support@algotest.in
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"
}
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"
}
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": {}
}
}
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": {}
}
}
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 |