Users will find a 32 character alphanumeric key listed on the general page of the config. This key is required in all API requests made by third party programs. The key is client side, so users will be required to enter their key into third party programs that interact with the api. The key is static and will be the same throughout sessions, however the user can manually generate a new key through the web interface.
Third party scripts should make use of this key by including it in the url of the api request.
Code: Select all
http://localhost:8080/sabnzbd/api?mode=qstatus&output=xml&apikey=711de66ca57dae90338267d05f70efe9
Code: Select all
error: API Key Required
Code: Select all
error: API Key Incorrect
Code: Select all
http://localhost:8080/api?mode=config&name=set_apikey&apikey=EXISTINGAPIKEY
For versions older than 0.4.9 supplying the API Key in the api request will not work, if you wish to also support older versions then you should check the current version using the API:
XML:
Code: Select all
http://localhost:8080/sabnzbd/api?mode=version&output=xml
Code: Select all
http://localhost:8080/sabnzbd/api?mode=version&output=json
Code: Select all
http://localhost:8080/sabnzbd/api?mode=version
If you wish to add support for 0.4.9 before it's public release, then please sign up as a release tester which should give you access to a pre-release version of 0.4.9 a few days before the final release.
If you have any questions feel free to ask in this thread.