An API request is an HTTP request sent to the URL:
http://api.ipernity.com/api/[method]/[format]
[method]: The API method you want to call.[format]: The response format you wish. Format is optional, default value is json.All data must be encoded in UTF-8 format.
We try to detect if you use another charset. So we attempt to convert to UTF-8 (but it's better to use UTF-8 encoding).
Some API methods require signature. So ipernity can check whether your application is the requester or not.
To sign a request, you must get an API key (api_key) and a secret code (secret). This secret code must be kept... secret!
The request signature corresponds to the md5 of a string composed of the following parameters concatenated each other without spaces:
method,secret.
For example, if you wish to call doc.tags.add method with the following parameters:
api_key: 6fa87ba500002712bd4eed6020f3bd72secret: e9a599f0cf6ce193doc_id: 1234keywords: easyapi_key6fa87(...)bd72doc_id1234keywordseasydoc.tags.adde9a599f0cf6ce193and its md5:
a269b218feb341ef03bc093a0f2c8078
The signed API request will be:
http://api.ipernity.com/api/doc.tags.add/json?api_key=6fa87(...)bd72 &doc_id=1234&tag=easy&api_sig=a269b218feb341ef03bc093a0f2c8078
Missing or invalid signature will cause 104 (missing) or 105 (invalid) error.
Did you know? We propose a signature calculation wizard.
Calculation of an authorization link signature is made like calculation of a request signature without specifying an API method name.
For instance, if we like to ask "read" authorization on a user's network, here are the parameters to sign:
api_key: 6fa87ba500002712bd4eed6020f3bd72secret: e9a599f0cf6ce193perm_network: readapi_key6fa87(...)bd72perm_networkreade9a599f0cf6ce193and its md5:
da183021cd39461108770b822fcd9398Here is the authorization link:
http://www.ipernity.com/apps/authorize?api_key=6fa87(...)bd72 &perm_network=read&api_sig=da183021cd39461108770b822fcd9398Learn more about authentication for Web applications or authentication for desktop applications.