Error on Create Thing service, when accessed via postman
I have simple create Thing service that works fine when I test it in Thingworx.
But when trigered via postman it returns error:
"TypeError: Cannot call method "CreateThing" of null"
Permissions seem not to be the problem. Im guessing its something simple but im stumped.
If anyone has an idea it would be greatly appreciated.
Service code:
var nameThing="TestThing";
try
{
params = {
name: nameThing,
description: "This Is A New Thing",
thingTemplateName: "GenericThing",
projectName:'PMI Demo',
};
Resources["EntityServices"].CreateThing(params);
Things[nameThing].EnableThing();
Things[nameThing].RestartThing();
result="Ok";
}
catch (err) {
result="Not Ok";
}

