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.
Request Body
The email address of the user.
The password for the account.
Response
An object containing the user’s information.The unique identifier for the user.
An object containing the authentication tokens.The access token for authenticating subsequent requests. Use this in the Authorization header as a Bearer token.
The refresh token for obtaining new access tokens.
curl -X POST https://api.llmgenerator.com/api/v1/auth/login \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]",
"password": "securePassword123"
}'
{
"user": {
"id": "user_xxxxxxxxx",
"email": "[email protected]",
"firstName": "John"
},
"tokens": {
"accessToken": "ey...",
"refreshToken": "ey..."
}
}