In order to generate a shortened URL, the user simply needs to call the endpoint /shorten/ using a POST request and with the following payload:
{
"url": "https://google.com", //The url to be shortend. For security reasons, only the domain names are accepted. local addresses, or ip addresses are not allowed
"validity_duration": 5// The number of months the token will be retained.
}
The API will respond with the new generated URL on our domain https://02w.me which you can directly try out on your own browser. Here is an example refering to the Google.com: https://02w.me/obpsE