Beginning the process of building applications and tools using the P2 is very simple, and you can be up and running in no time.
Simply follow the steps outlined below and you will be running in no time.
1.) Launch Paronicon2 (Version 0.3.0.0 or higher)
2.) Click on Globals->API Management (http://cl.ly/OqIC)
3.) Type in the username and password that you want to use when interfacing with the API. It’s worth noting that P2 supports multiple users and each of them can have completely different permissions. (http://cl.ly/OptX)
4.) Once you add the user, you can double click on the name in the list on the right, and it will fill the box at the bottom with the permissions that the user can have. (http://cl.ly/OpqF)
5.) Check and uncheck the permissions boxes for each user to give them the permissions they need (it auto-saves them on check/uncheck. (By default, new users get authUser, isTokenActive, getServers, and unAuthUser).
6.) Goto Globals->Global Options, then click on the API tab.
7.) Insert a port that you would like Paronicon2 to listen on for API calls.
8.) Check the box that says “Enable API Access”. (This will put an install token in the box provided, but this key is not used at this time).
9.) Close the dialog and at the main screen, the lower right corner should now show that the API thread is running. (http://cl.ly/Opq2)
At this point, the API is now listening for requests. If you navigate to your local host at that port (http://127.0.0.1:18888/), you should receive a response similar to the below:
1 2 3 4 5 6 7 8 9 10
<paronicon> <request> <params /> <timestamp>1368056676</timestamp> </request> <response responseCode="401"> <errorType>NotLoggedIn</errorType> <errorDescription>You need to login before requesting that method!</errorDescription> </response> </paronicon>