3 Replies Latest reply on Dec 8, 2017 6:12 AM by mbasha RSS
    aagrawal-3 Newbie

    How to call Thingworx Rest API from Javascript



    I am making REST call from JavaScript to Thingworx Thing to execute service and getting HTTP Status Code 403 - Access to resource forbidden

    User has execute service permission also.


    var xhttp = new XMLHttpRequest();

    xhttp.open("POST", "http://localhost:8080/Thingworx/Things/REST/ServiceDefinitions/service?appKey=5da8484d-2605-458d-af0a-be4d83f5baac", false);

    xhttp.setRequestHeader("Content-type", "text/html");

    xhttp.withCredentials = true;




    Note: Thingworx version 7.4


    Please suggest.