Create short URLs from our API!
To get an API key, you must log in as a Pro member.
Example of creating short URLs:
Without options
http://rikiki.net/api?username=login&key=your_api_key&url=example.com
With options
http://rikiki.net/api?username=login&key=your_api_key&url=example.com&preview=0&cloacking=1
Parameters and description:
Parameters can be send as GET or POST.
Mandatory parameters | Description | Default value |
---|---|---|
username | Username of your Pro account | null |
key | Your API key | null |
url | URL or email address to shorten | null |
Optional parameters | Description | Default value |
alias |
Enables you to customize your short URL. E.g.: If you type myurl, the URL will be shorten to: http://rikiki.net/myurl |
null |
preview |
Indicates if the link information must be hidden or not (value must be 0 or 1). If 0: Information will be hidden. If 1: Information will be visible. |
1 |
cloacking |
Enables to hide the redirection URL in the address bar (value must be 0 or 1). If 0: The redirection URL will be visible. If 1: The redirection URL will be hidden. |
0 |
Return values
Values are returned in JSON format. Example:
{ "long_url": "http://www.example.com/very/very/long/url", "short_url": "http://rikiki.net/Hd94b" }
Explanations:
- long_url : Long URL or email address you want to shorten
- short_url : Short URL obtained
Errors
In case of error, the value error is returned. It contains the list of all the errors found, separated by a coma. Examples :
{ "error":"Required : username" }
{ "error":"Wrong parameter : username,key,url" }
Here are the different types of errors:
- username : Incorrect username.
- key : Clé API incorrecte
- url : Incorrect URL or email
- alias already used : The customized URL (alias) is not available.