🌐 An open-source URL shortener.
You are free to use and edit this project, but you have to gave the credits to the project.
METHOD : POST
ENDPOINT: /login
Payload
{
"username": <USERNAME>,
"password": <PASSWORD>
}
Responses
Sucess : 200
{
"token": <USER-TOKEN>
}
Invalid username or password : 400
{
"status": "Invalid user."
}
Empty Fields: 400
{
"username": ["The username field is required."],
"password": ["The password field is required."]
}
METHOD : GET
ENDPOINT: /login/<LINK>
Payload
Passed in uri
/login/<LINK>
Responses
Sucess : 200
{
"user_id": <USER-ID>,
"shortened": <SHORTENED>,
"link": <UNSHORTENED-LINK>,
"created_at": <TIME>,
"updated_at": <TIME>
}
Invalid Param : 400
{
"status": "Invalid Param."
}
Empty Field : 400
{
"status": "Empty Field."
}