POST /auth/signup
application/json{
"first_name": "John",
"last_name": "Doe",
"email": "[email protected]",
"password": "my_password"
}
{
"token": "eyJhbGciOiAiSFMyNTYiLCAidHlwIj...",
"status": "success",
"message": "Account registered successfully"
}
{
"status": "error",
"message": "Validation failed: Email has already been taken."
}
{
"status": "error",
"message": "Invalid request method"
}
Ensure to replace John, Doe, [email protected], and
my_password
with valid signup credentials.
The obtained token should be included in the Authorization header for subsequent authenticated
requests.
POST /auth/login
application/json{
"username": "[email protected]",
"password": "my_password"
}
{
"token": "eyJhbGciOiAiSFMyNTYiLCAidHlwIj...",
"status": "success",
"message": "Login Successful"
}
{
"status": "error",
"message": "Invalid. Missing username or password."
}
{
"status": "error",
"message": "Invalid username or password."
}
{
"status": "error",
"message": "Login Failed. retry"
}
Ensure to replace [email protected] and my_password with valid login
credentials.
The obtained token should be included in the Authorization header for subsequent authenticated
requests.