Login via Twitter
redir.ec short URLs are created by using the URL (http://redir.ec/_api/rest/redirec/create).
There are four parameters (url, redirec, appid, apikey); the URL parameter (url) is compulsory.
Example of call containing all parameters:
http://redir.ec/_api/rest/redirec/create?url=http%3A%2F%2Fwww.domain.de%2F%3Fugly%3Dparameter&redirec=my-custom-short-url&appid=my-application-name&apikey=1a1a1a1a1a1a1a1a
If this call was successful, the following URL would be returned:
http://redir.ec/my-custom-short-url
http://redir.ec/_api/rest/redirec/create?url=http%3A%2F%2Fwww.domain.de%2F%3Fugly%3Dparameter
If this call was successful, the following URL would be returned:
http://redir.ec/thDM
The URL to be shortened. The parameter is required and must be URL-encoded.
Example of parameter value:
http%3A%2F%2Fwww.domain.de%2F%3Fugly%3Dparameter
http%3A%2F%2Fwww.foobar.de%2F
An optional custom URL name from redir.ec. If the parameter is not available, a random URL name will be created.
Examples of parameter value:
my-custom-url
new-spam-info
An optional Application ID. This ID is saved in order to retrieve the service via which the redir.ec API was used. Using text and URL is possible with a URL-encoded parameter.
Examples of parameter value:
my-application
twitter
tweetdeck
My+tool+from+http%3A%2F%2Fwww.my-tool-box.de%2F
Your API key. If you add your API key to the API create request, the created short-URL will be added to your account. You will find your API key in your Profile.
Example of parameter value:
1a1a1a1a1a1a1a1a
If the URL was created successfully, the server will deliver the standard HTTP status code 200 with the shortened URL.
Examples of returns:
http://redir.ec/my-custom-url-name
http://redir.ec/thDM
If an error occurs, the server will deliver the code 404 with an explanation of the error situation.
Return in case of error: compulsory field "URL" not provided or empty.
please provide a url to shorten
please provide a longer url
your provided custom url name contains forbidden characters
your provided custom url name is already in use
the url you provided is short enough
Get the destination of an shortened URL.
Example of call:
http://redir.ec/_api/rest/redirec/expand?redirec=http%3A%2F%2Fredir.ec%2Ftx0b
If this call was successful, the following URL would be returned:
http://translate.google.com/translate_t#en|de|Short%20this%20really%20long%20URL%20with%20redir.ec!
The shortened URL, the parameter is required and must be URL-encoded.
Example of parameter value:
http%3A%2F%2Fredir.ec%2Ftx0b
tx0b
If the shortened URL (redirec) exists, the server will deliver the standard HTTP status code 200 with the shortened URL.
Example of return:
http://translate.google.com/translate_t#en|de|Short%20this%20really%20long%20URL%20with%20redir.ec!
If an error occurs, the server will deliver the code 404 with an explanation of the error situation.
Return in case of error:
redirec not valid or unknown
simple drag it to your bookmarks to shorten URLs from anywhere
Drag it to your bookmarks and on click the current URL will be shortened and copied to your email client
to shorten directly via context menu and copy to clipboard
From Firefox 3.5 please use Shorten URL for now. (It's supporting redir.ec)
Or use Nadens Jetpack Plugin
Useful functions for your application
Shorten permalinks and tweet directly via redir.ec