Documentation on how to use Premium URL Shortener's API system to develop your apps. The new API of Ushort is built on the RESTful architecture and it allows you to easily interact with your website using the following endpoints. There were some changes to the API in order to facilitate requests from developers.
Authentication
As before, an API key is required for requests to be processed by the system. Once a user registers, an API key is automatically generated for this user and it can be found in the /user/tools page. The API key must be sent with each request via the key parameter.
Response Handling
All API responses are returned in JSON format by default. To convert this into usable data, the appropriate function will need to be used according to the language. In PHP, the function json_decode() can be used to convert the data to either an object (default) or an array (set the second parameter to true). It is very important to check the error key as that provides information on whether there was an error or not.