Skip to main content

API: User Management

Comments

8 comments

  • Kyle Ketterer

    I hope the following bit of information will be useful to somebody in the future:

    When sending an XML body to the server, it NEEDS the standard xml header....eg: <?xml version="1.0"?>

    Without this header, the request will fail. Also, the XML example above for updating user passwords appears to be incorrect as the correct XML syntax uses left/right arrows <changePassword>, not brackets [changePassword]

    0
  • Danielle Morley

    Hello Kyle,

    Thank you for your comment.  The [changePassword] vs. <changePassword> issue has been corrected.  As for the standard XML header being required, we have found that this is not the case.  If you are encountering an error and would like assistance, please contact Support at 1-888-762-7472 or support@prontoforms.com with the error message and we would be happy to troubleshoot.  

     

    0
  • Sunil Pai

    I don't see how I can determine the group ids to specify when creating a user.

    Is there a REST API command to retrieve the list of groups?

    Or do I just click on each group in the web UI and note the number in the URL?

    0
  • GlennMC

    @Sunil, currently looking in the web UI is the only method of discovering the groups IDs.

    /Glenn

     

    0
  • Sunil Pai

    In the "Delete a User" section, the URLs in "URL Structure" are for changing a user's password. The URLs listed in "Sample cURL Commands" are correct. Please update the documentation.

    0
  • Danielle Morley

    Sunil,  

    Thank you for bringing this our our attention.  The URLs have been corrected.

    0
  • Manson Rawding

    Hello I am trying to use javascript to pull back and display some JSON data as a quick proof of concept that the REST API works from a web client.  Has anyone ever tried this?  Is this code on the right track?  Has anyone got any samples of how one would use javascript to do this?

    Thanks, I appreciate any help.

     

    <!DOCTYPE html>

     

    <html>

     

    <body>

     

     

     

    <div id="id01"></div>

     

     

     

    <script>

     

    var xmlhttp = new XMLHttpRequest();

     

     

     

    var apiKey = "[Enter your generated API key here]";

     

    var url = "https://api.prontoforms.com/api/1/users.json&key=apiKey";

     

     

     

     

     

    xmlhttp.onreadystatechange = function() {

     

        if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {

     

            var myArr = JSON.parse(xmlhttp.responseText);

     

            myFunction(myArr);

     

        }

     

    };

     

    xmlhttp.open("GET", url, true);

     

    xmlhttp.send();

     

     

     

    function myFunction(arr) {

     

        var out = "";

     

        var i;

     

       for(i = 0; i < arr.length; i++) {

     

            out += '<a href="' + arr[i].url + '">' +

     

            arr[i].display + '</a><br>';

     

        }

     

        document.getElementById("id01").innerHTML = out;

     

    }

     

    </script>

     

     

     

    REST API test:

     

    </body>

     

    </html>

     

    0
  • GlennMC

    @Manson Rawling

    Putting the API credentials as a URL argument in that way is not going to work.  

    Here are a few articles on handling basic authentication (the authentication method through which you need to provide the key and secret) within javascript that may help:

    http://stackoverflow.com/questions/5507234/how-to-use-basic-auth-with-jquery-and-ajax

    http://stackoverflow.com/questions/491914/pure-javascript-code-for-http-basic-authentication

    I hope this helps.

    /Glenn

     

     

     

    0

Please sign in to leave a comment.