curl --request POST \
--url https://api.example.com/auth/login \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>",
"password": "<string>"
}
'{
"token": "<string>",
"error": "<string>"
}Authenticate an existing user with email and password
curl --request POST \
--url https://api.example.com/auth/login \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>",
"password": "<string>"
}
'{
"token": "<string>",
"error": "<string>"
}{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
{
"error": "An unexpected error occurred. Please try again later."
}
curl -X POST https://api.planttogether.com/auth/login \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]",
"password": "securePassword123"
}'