2 Replies Latest reply on Sep 8, 2017 3:38 PM by mbereket RSS
    mbereket Apprentice

    POST call returns "An Entity Name Must Be Provided" response

    Hey All,


    I am trying to create a user and organization via TW API calls, (not through the Composer).

    and everytime I do it, I get "An Entity Name Must Be Provided" response.

    Interesting thing is, call works on POSTman but it doesnt work on my node script. I made sure I put headers and everything same with the postman, but still I get "An Entity Name Must Be Provided"



    Here is my post call on Node script


    app.get('/hey/:name', function (req, res) {



      var payload = {

      url: 'https://XXXX.net/Thingworx/Resources/EntityServices/Services/CreateUser?appKey=XXXXXXXXXXXXXXX,
      headers: {

           'Access-Control-Allow-Origin': '*',
      data: {




      request(payload, function (err,response,body) {

      //var data = JSON.parse(body);
      res.send('Hello '+body)





    any idea how I can get this working?





      • Re: POST call returns "An Entity Name Must Be Provided" response
        jamesm Creator

        I'm not super familiar with node, but if you're using Request, this is working for me in PostMan:


        var request = require("request");
        var options = { method: 'POST',
          url: 'http://localhost/Thingworx/Resources/EntityServices/Services/CreateUser',
           { appkey: 'c30da817-cf61-49ea-a2b0-c9027c7eaa29',
             accept: 'application/json',
             'content-type': 'application/json' },
           { name: 'helloUser123',
             password: 'test123',
             description: 'testDescription' },
          json: true };
        request(options, function (error, response, body) {
          if (error) throw new Error(error);


        I don't really see anything wrong with your request, however, and I can't get that same error despite trying a few things. Are you use the parameter name is being passed? Could you try hardcoding this to some value and see if you get the same error? Maybe it is because you are using data instead of body?