Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X
Basically, I'm trying to demo by connecting an ultrasonic sensor to my local H2 based Thingworx Copy.
When running Thingworx on localhost on Chrome, On a new tab, If I try to run this URL below to run service which sets the value of my Ultrasonic Sensor:-
Then it works and mashup also updates.
However, if I try to run the same link with another browser, it doesnt work. Also, if I try to run this same link with Python using requests.post("http://localhost:8080/Thingworx/Things/UltraSonicSensor/Services/setDistance?appKey=6cc0dd07-c78a-4548-9109-b2c9cbe7298e…"), It still doesn't work.
Please help.
Solved! Go to Solution.
Muhammad, you might want to recheck the appKey as Dinesh has mentioned, additionally try testing your REST call using Postman it should be really fast and easy to debug the issue.
It could be possible that it works under Chrome in different tab because the session has the require data to authenticate, did you test in the Incognito Mode?
Hi Muhammad Hassan,
you should do small change subsystem,if you are using 6.0 or later. you should do this,
Go to Systems> subsystem>PlatformSybsystem in composer.Within the subsystem, open configuration and check the box next to Allow Request Method Switch and un-check the box next to Filter Content-Type. refer the attachment.
Thanks,
DINESH
I've already done that configuration in my browser.
I receive no errors when I use Chrome to execute the command. (When thingworx local instance is running on Chrome)
This is the error I get when I try to run it in Firefox:-
This is the error I get in Python as well:-
Hi Muhammad Hassan,
configuration was correct. I think you should check the AppKey. you should also check the current user (loggedin) has Appkey or not?
might be this will be reason you will gettting this error.
Thanks
DINESH
Muhammad, you might want to recheck the appKey as Dinesh has mentioned, additionally try testing your REST call using Postman it should be really fast and easy to debug the issue.
It could be possible that it works under Chrome in different tab because the session has the require data to authenticate, did you test in the Incognito Mode?
It seems I was using wrong App Key =P..
Positive point I noted from this thread is that even if you put wrong app key in the same session which is authenticated, It still works even if you're using wrong app key.
Thanks for the help Guys.