v2
latestOpenAPI 3.1.02026-07-267085761.0 MBAuth
Auth User
Authenticates a user and returns a response.
This function checks if the user exists in the database, sends an OTP to the user's phone number, and creates a new user if the user does not exist.
Args: user (UserCreate): The user to be authenticated. db (AsyncSession): The database session.
Returns: CommonResponse: A response indicating the success or failure of the authentication.
post/api/v1/auth/
Request body
Response
Successful Response
Example response
{
"success": true,
"message": "Operation completed.",
"queryGeneratedTime": 1718006400
}