Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
Hi Developers,
I'm working on a scenario where a user with a reference in the composer should be able to invoke a service in a thing through URL alone.
http://Administrator:admin@123@localhost/Thingworx/Things/Test123/Properties/temp?Accept=application/json
Through the above URL i was able to fetch the JSON response of the property. But the drawback is for the first time even with the user credentials passed in the URL, i got the Thingworx User Credentials prompt window coming up. After cancelling it out and trying again with the same session i got the expected result.
So is this a normal behavior or do we have any work around for it.
For invoking a service how to pass the input params in the same way as above.
The whole point is to invoke a Thingworx service from a third party server by passing the user creds in the URL.
(we would prefer the credentials being passed instead of the Application key).
Thanks and Regards,
Saran.
Solved! Go to Solution.
use similar type of URL with credentials
http://localhost/Thingworx/Things/[Thing Name]/Services/GetIdentifier?method=post&userid=Administrator&password=admin
refer this article : https://www.ptc.com/en/support/article?n=CS224211
You need to use an appkey.
http://support.ptc.com/help/thingworx_hc/thingworx_8_hc/en/#page/ThingWorx%2FApplicationKeys.html
use similar type of URL with credentials
http://localhost/Thingworx/Things/[Thing Name]/Services/GetIdentifier?method=post&userid=Administrator&password=admin
refer this article : https://www.ptc.com/en/support/article?n=CS224211
It is recommended to use the headers to pass the auth and content type etc.
vs. in the URL.
Not sure if your app/device has that capability
Could you please reply on this post.
please confirm if the issue has been resolved.
If yes, please mark the answer as accept as solution for the future reference. Thank you in advance.
Regards-Mohit Goel
Hi @mgoel,
I was trying the solutions that was give in the reference article but was not able to get the result. The article seems to be relevant for ThingWorx Platform 6.0 to 7.4. I'm currently using 8.0 version. i'll check out with 7.2 version and will respond correspondingly.
Regards,
saran
Hi @SaranKarthick.
If one of the previous responses allowed you to find a solution, please mark the appropriate one as the Accepted Solution for the benefit of others who may have the same question.
Regards.
--Sharon