how to avoid multiple short URLs in urlBorg API

The urlBorg API will normally create a new short URL each time the ‘create’ method is called. There is a good reason for this, but many devlopers have been asking for a way to reuse already created short URLs.

I just added a new option that is currently only available through the API. Instead of using the ‘create’ method, you can now use the ‘create_or_reuse’ method. ‘create_or_reuse’ will check if the same combination of (api_key, long URL) has already been used and if so will return the short URL from the database instaed of creating a new one -if not, a new one will be created, as usual.

Check out the urlBorg API for details.

Comments are closed.