voltier Posted December 29, 2015 Report Share Posted December 29, 2015 Im stuck the first step - being the steps to generate a session key. I have enabled my ip address under the 'access' settings on the pbx Right now I am getting a HTTP 200OK however in the Response, all i get is 'false'. Also i dont quite understand this - {"name":"auth","value":"admin 97c9bb5fec29bfbfbd0069adb232d610"} username and md5 encrypted password - from the Rest API documentation 1) How does one generate an md5 encrypted password based on a plain text one? When inserting the form fields for the header, - assuming the username is admin: does name = admin auth = password? or value = password Im confused as there is "name", "auth" as well as "value" Thanks for your help Quote Link to comment Share on other sites More sharing options...
voltier Posted December 29, 2015 Author Report Share Posted December 29, 2015 Managed to work it out. Basically manually converted the password to md5 and used the exact same string from the api documentation and that generated a session key. Quote Link to comment Share on other sites More sharing options...
Vodia PBX Posted December 29, 2015 Report Share Posted December 29, 2015 Once you know how it works it is easy Quote Link to comment Share on other sites More sharing options...
voltier Posted December 30, 2015 Author Report Share Posted December 30, 2015 Thanks Admin - Merry Christmas and Happy New Year! Quote Link to comment Share on other sites More sharing options...
voltier Posted January 2, 2016 Author Report Share Posted January 2, 2016 Hi again Admin, Just some follow up questions. I can generate the session key, but im not having much success using the session key to retrieve other data such as licensing information etc. Also within the PBX, there is an a parameter where you can add IP addresses for 'API Access'. Can you clarify what this is for? The retrieve session key command works regardless if my public IP is in this list or not. In terms of retrieving other information using the session key, I am getting a 403 Permission denied. I had mistakenly thought i got it working, but it was simply a matter of me having logged into the admin interface of the PBX and the rest API call was pre-authenticating therefore was retrieving the data. If I log out of the web interface, I get 403 Permission denied. Quote Link to comment Share on other sites More sharing options...
Vodia PBX Posted January 2, 2016 Report Share Posted January 2, 2016 We have some code available at http://vodia.com/documentation/vodia_php_rest_api did you see that? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.