CutLink's is a URL Shortener built using Python (Flask) that helps user to shorten therir URL both using Website and API calls.
- Login/Signup
- Intigrated Database
- Dashboard
- Users have choice to choose custom Slug for their Links
- Rest API buit using flask_restful
- API authentiction with API Key
CutLinks requires Python 3 to run.
Follow the following steps to start the server.
git clone https://github.com/harshitgarg02/CutLinks.git
cd cutlinks
pip install -r requirements.txt
Change the values of variable in config.py [Currently Filled with Sample Data], After changing start the server with
python run.py
Request:
POST /api/shorten
Parameters:
long_url : URL that needs to be shortened.
Optional Parameters:
api_key : Token that you get when you register on our website.
custom_url : Custom Slug if needed.
Example Request:
POST https://cutlinks.herokuapp.com/api/shorten/?api_key=8f6f3c862eb7135b48d1c12b229ed5c3012f68930a43ae07e3280dd8f878d6f4&long_url=https://cutlinks.herokuapp.com/&custom_url=homepage
Example Response:
{
"status": 200,
"message": "Request Sucessfully Executed.",
"data": {
"Short URL": "https://cutlinks.herokuapp.com/homepage",
"Destination URL": "https://cutlinks.herokuapp.com/"
}
}
Request:
GET /api/getinfo
Parameters:
short_url : Shortened URL whose data needs to be Fetched.
Optional Parameters:
api_key : Token that you get when you register on our website.
Example Request:
GET https://cutlinks.herokuapp.com/api/getinfo/?api_key=8f6f3c862eb7135b48d1c12b229ed5c3012f68930a43ae07e3280dd8f878d6f4&short_url=https://cutlinks.herokuapp.com/homepage
Example Response:
{
"status": 200,
"message": "Request Sucessfully Executed.",
"data": {
"Short URL": "https://cutlinks.herokuapp.com/homepage",
"Destination URL": "https://cutlinks.herokuapp.com/",
"No. of Clicks": 10,
"Created At": "2022-05-11 22:16:09.584971+00:00"
}
}
MIT