POST /auth/login
This endpoint allows a user to log in by providing their email and password. On successful authentication, it returns access and refresh tokens for subsequent API requests.
Request Body
The email address of the user.
The password for the account.
Response
Indicates if the login was successful.
Human-readable status message.
An object containing the user’s information. The unique identifier for the user.
The user’s email address.
Whether the email has been verified.
ISO 8601 timestamp of last update.
An object containing the authentication tokens. The access token for authenticating subsequent requests. Use this in the Authorization header as a Bearer token. Expires in 15 minutes.
The refresh token for obtaining new access tokens. Expires in 7 days.
Token expiry time in seconds (900 = 15 minutes).
The token type (always “Bearer”).
curl -X POST https://api.llmgenerator.com/api/v1/auth/login \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected] ",
"password": "securePassword123"
}'
Success (200)
Invalid Credentials (401)
{
"success" : true ,
"message" : "Login successful" ,
"user" : {
"id" : "550e8400-e29b-41d4-a716-446655440000" ,
"email" : "[email protected] " ,
"name" : "John Doe" ,
"emailVerified" : true ,
"updatedAt" : "2026-01-29T12:00:00.000Z"
},
"tokens" : {
"accessToken" : "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." ,
"refreshToken" : "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." ,
"expiresIn" : 900 ,
"tokenType" : "Bearer"
}
}