If you are working on an application where you need to use the login API and registration API for testing or practice purposes, then you have come to the right place. Whether you are working in Python, JavaScript, React.js, it does not matter; you can consume these APIs on any platform.

Free api for login and registration 

Whether you are working with Spring Boot for Java applications or using JavaScript for frontend development, having access to simple and free APIs for testing purposes can significantly ease the development process. In this blog post, we'll explore various simple login and registration APIs that cater to different technologies.

You can try the API below to test CRUD operations in your application.

Dummy login api for testing


Here, I have created a sample test login API that takes the email and password as parameters in the request body and returns a response based on the input request body.
Loginapi/auth/login
Url: https://www.quickpickdeal.com/api/auth/login
Request body
{
            "email": "[email protected]",
            "password": "12345"
}
Response body
{
            "Success": true,
            "Error": null,
            "Data": {
            "AccessToken": "ea3827f1-3fa6-4170-b772-b06783f33e75",
            "ExpiresAt": "2023-12-11T11:44:21.7437206Z",
            "Id": 1,
            "Email": "[email protected]",
            "FullName": "test user",
            "PhoneNumber": "9839033889"
  }
}
If the email or password is incorrect, the response will have 'Success' set to false, and the 'Error' key will contain an error message.
{
            "Success": false,
            "Error": "Please check your credentail, Invalid username or password. Please try again",
            "Data": null
}
If the email is not a valid email address or the password is less than 5 characters, you will receive a bad request from the API, indicating a validation error.
Request
{
            "email": "test@example",
            "password": "128"
}
Response
{
            "errors": {
            "Password": [
            "The Password must be at least 5 characters long."
    ]
  },
            "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
            "title": "One or more validation errors occurred.",
            "status": 400,
            "traceId": "00-50f79a59895dce4c88edac11ceec4ade-054b5cbd16acc347-00"
}
Below is the sample test registration API that takes the email, full name, phone number, and password as parameters in the request body and returns a response based on the input request body.
Registrationapi/Auth/Registration
Url: https://www.quickpickdeal.com/api/auth/registration
Request body
{
                "email": "[email protected]",
                "fullName": "test user",
                "phoneNumber": "9415128845",
                "password": "12345",
                "confirmPassword": "12345"
}
Response body
{
                "Success": true,
                "Error": null,
                "Data": {
                "Id": 4,
                "Email": "[email protected]",
                "FullName": "test user",
                "PhoneNumber": "9415128845"
  }
}
*During registration, in the request body, the password should be at least 5 characters, and the email address should be in a valid email format.
In case, during registration, in the request body, the password is less than 5 characters or the email address is not in a valid email format, you will receive the following error message:
{
                "errors": {
                "Email": [
                "The Email field is not a valid e-mail address."
    ],
                "Password": [
                "The Password must be at least 5 characters long."
    ],
                "ConfirmPassword": [
                "'ConfirmPassword' and 'Password' do not match."
    ]
  },
                "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
                "title": "One or more validation errors occurred.",
                "status": 400,
                "traceId": "00-e985c1b7e1b42342b256c424870cbd39-94d8ae1b2b217544-00"
}
During registration, if the passwords in the request body do not match, you will receive this error.
{
                "errors": {
                "ConfirmPassword": [
                "'ConfirmPassword' and 'Password' do not match."
    ]
  },
                "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
                "title": "One or more validation errors occurred.",
                "status": 400,
                "traceId": "00-3f14ae6cd60f0546b5a89efd6d84bc1c-3d25930e3927dd40-00"
}
If a user sends an email that is already in use by another user, you will receive this error.
{
                "Success": false,
                "Error": "Email already in use. please log in instead",
                "Data": null
}