<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: REST API Authentication problem on Thingworx 8 in ThingWorx Developers</title>
    <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/REST-API-Authentication-problem-on-Thingworx-8/m-p/545400#M27628</link>
    <description>&lt;P&gt;Do you have this myhouse thing for which you are fetching watts property.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 18 Apr 2018 08:12:28 GMT</pubDate>
    <dc:creator>arya81</dc:creator>
    <dc:date>2018-04-18T08:12:28Z</dc:date>
    <item>
      <title>REST API Authentication problem on Thingworx 8</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/REST-API-Authentication-problem-on-Thingworx-8/m-p/510460#M7710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello eveyone;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I recently discovered that in ThingWorx 8 , adding appKey to url for authentication has ben &lt;STRONG&gt;removed&lt;/STRONG&gt; for security reasons.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cant find working HTTP Requests examples which includes &lt;STRONG&gt;necessary headers with proper syntax.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using NodeMCU with MicroPython Flash. I can successfully make HTTP requests to any REST testing site. eg. &lt;A href="https://httpbin.org/" title="https://httpbin.org/"&gt;https://httpbin.org/&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also test my Url in Postman. which it also work properly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #505050; font-family: OpenSans, Helvetica, Arial, sans-serif; font-size: 12px; background-color: #fafafa;"&gt;&lt;A _jive_internal="true" href="https://www.ptcusercommunity.com/external-link.jspa?url=http:" rel="nofollow" target="_blank"&gt;http://&lt;/A&gt;&lt;SPAN&gt;&amp;lt;server&amp;gt;/Thingworx/Things/NodemcuTest/Properties/input&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #505050; font-family: OpenSans, Helvetica, Arial, sans-serif; font-size: 12px; background-color: #fafafa;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #505050; font-family: OpenSans, Helvetica, Arial, sans-serif; font-size: 12px; background-color: #fafafa;"&gt;Here is my code. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #505050; font-family: OpenSans, Helvetica, Arial, sans-serif; font-size: 12px; background-color: #fafafa;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #505050; font-family: OpenSans, Helvetica, Arial, sans-serif; font-size: 12px; background-color: #fafafa;"&gt;Note : I use &lt;STRONG&gt;urequests&lt;/STRONG&gt; library as requests.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #505050; font-family: OpenSans, Helvetica, Arial, sans-serif; font-size: 12px; background-color: #fafafa;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_15135967078205796 jive_text_macro" jivemacro_uid="_15135967078205796"&gt;&lt;P&gt;&lt;SPAN&gt;url = '&lt;/SPAN&gt;&lt;A _jive_internal="true" href="https://www.ptcusercommunity.com/external-link.jspa?url=http:" rel="nofollow" target="_blank"&gt;http://&lt;/A&gt;&lt;SPAN&gt;&amp;lt;server&amp;gt;/Thingworx/Things/NodemcuTest/Properties/input'&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;headers = {'appkey': 'xxxx-xxxx-xxx-xxxx-xxxx-xxx' &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Accept': 'application/json'} &lt;/P&gt;&lt;P&gt;getreq = requests.get(url, headers=headers).json() &lt;/P&gt;&lt;P&gt;s = getreq["rows"][0]["cont"] &lt;/P&gt;&lt;P&gt;print(s) &lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope i made myself clear about the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;Murat Can&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Dec 2017 11:41:41 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/REST-API-Authentication-problem-on-Thingworx-8/m-p/510460#M7710</guid>
      <dc:creator>mberber</dc:creator>
      <dc:date>2017-12-18T11:41:41Z</dc:date>
    </item>
    <item>
      <title>Re: REST API Authentication problem on Thingworx 8</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/REST-API-Authentication-problem-on-Thingworx-8/m-p/510461#M7711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Murat,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The application key can be passed in as an http header called "appKey" (caplital K).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hopefully that helps!&lt;/P&gt;&lt;P&gt;~James&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Dec 2017 14:17:23 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/REST-API-Authentication-problem-on-Thingworx-8/m-p/510461#M7711</guid>
      <dc:creator>jamesb</dc:creator>
      <dc:date>2017-12-18T14:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: REST API Authentication problem on Thingworx 8</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/REST-API-Authentication-problem-on-Thingworx-8/m-p/510462#M7712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi James;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I switch to using Arduino IDE to programming nodeMCU and it worked...only works on my local Thingworx Installition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://192.168.1.101/Thingworx/Things/testThing/Properties/testProp?method=PUT&amp;amp;appKey=97dcc98d-390f-4036-9cce-1b6295ad20ec&amp;amp;value=0" title="http://192.168.1.101/Thingworx/Things/testThing/Properties/testProp?method=PUT&amp;amp;appKey=97dcc98d-390f-4036-9cce-1b6295ad20ec&amp;amp;value=0"&gt;http://&amp;lt;host&amp;gt;/Thingworx/Things/testThing/Properties/testProp?method=PUT&amp;amp;appKey=&amp;lt;appkey&amp;gt;&amp;amp;value=1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This syntax must be true -it works on my local Thingworx 8.0.2- but its not working on neither Postman nor our servers which installed Thingworx 8.0.2 and 7.4. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Dec 2017 11:06:45 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/REST-API-Authentication-problem-on-Thingworx-8/m-p/510462#M7712</guid>
      <dc:creator>mberber</dc:creator>
      <dc:date>2017-12-20T11:06:45Z</dc:date>
    </item>
    <item>
      <title>Re: REST API Authentication problem on Thingworx 8</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/REST-API-Authentication-problem-on-Thingworx-8/m-p/510463#M7713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Murat,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From a security standpoint, its preferable to use http headers over URL parameters.&amp;nbsp; For example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Post to &lt;/SPAN&gt;&lt;A _jive_internal="true" href="https://www.ptcusercommunity.com/localhost:8080/Thingworx/Things/JamesTestThing/Services/HelloWorld" rel="nofollow" target="_blank"&gt;http://localhost:8080/Thingworx/Things/JamesTestThing/Services/HelloWorld&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Headers:&lt;/P&gt;&lt;P&gt;Content-Type: application/json&lt;/P&gt;&lt;P&gt;Accept: Application/json&lt;/P&gt;&lt;P&gt;appKey: &amp;lt;someAppKeyAsAVeryLongString&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://www.ptcusercommunity.com/legacyfs/online/thingworx/8432_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This returns a result for me&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "dataShape": {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "fieldDefinitions": {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "result": {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "name": "result",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "description": "",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "baseType": "STRING",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "ordinal": 0,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "aspects": {}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; },&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "rows": [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "result": "Hello World"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ]&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Dec 2017 18:11:33 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/REST-API-Authentication-problem-on-Thingworx-8/m-p/510463#M7713</guid>
      <dc:creator>jamesb</dc:creator>
      <dc:date>2017-12-21T18:11:33Z</dc:date>
    </item>
    <item>
      <title>Re: REST API Authentication problem on Thingworx 8</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/REST-API-Authentication-problem-on-Thingworx-8/m-p/539232#M26604</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I tried your suggestions and is making a GET call to a thing property from Postman.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have tried sending the appKey in url and it gave me a 404 not found error.&lt;/P&gt;
&lt;P&gt;Next, i tried sending it as Header and still I am getting a 404. please see the screen shot attached. Any help would be appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 09 Mar 2018 05:39:37 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/REST-API-Authentication-problem-on-Thingworx-8/m-p/539232#M26604</guid>
      <dc:creator>sonali92jain</dc:creator>
      <dc:date>2018-03-09T05:39:37Z</dc:date>
    </item>
    <item>
      <title>Re: REST API Authentication problem on Thingworx 8</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/REST-API-Authentication-problem-on-Thingworx-8/m-p/545400#M27628</link>
      <description>&lt;P&gt;Do you have this myhouse thing for which you are fetching watts property.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Apr 2018 08:12:28 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/REST-API-Authentication-problem-on-Thingworx-8/m-p/545400#M27628</guid>
      <dc:creator>arya81</dc:creator>
      <dc:date>2018-04-18T08:12:28Z</dc:date>
    </item>
    <item>
      <title>Re: REST API Authentication problem on Thingworx 8</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/REST-API-Authentication-problem-on-Thingworx-8/m-p/547521#M28100</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I was able to solve this issue&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.ptc.com/t5/ThingWorx-Developers/404-error-when-making-REST-call-in-Thingworx-8/m-p/539320#M26616" target="_blank"&gt;https://community.ptc.com/t5/ThingWorx-Developers/404-error-when-making-REST-call-in-Thingworx-8/m-p/539320#M26616&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 May 2018 09:50:23 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/REST-API-Authentication-problem-on-Thingworx-8/m-p/547521#M28100</guid>
      <dc:creator>sonali92jain</dc:creator>
      <dc:date>2018-05-03T09:50:23Z</dc:date>
    </item>
    <item>
      <title>Re: REST API Authentication problem on Thingworx 8</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/REST-API-Authentication-problem-on-Thingworx-8/m-p/572192#M31092</link>
      <description>&lt;P data-pm-slice="1 1 []"&gt;This is with reference to the article&lt;BR /&gt;&lt;A href="https://www.ptc.com/en/support/article?n=CS264349" target="_blank"&gt;https://www.ptc.com/en/support/article?n=CS264349&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.thingworx.com/thread/43129" target="_blank"&gt;&lt;U&gt;https://community.thingworx.com/thread/43129&lt;/U&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Will the appkey param also supported in the Request header in the &lt;STRONG&gt;7-4-15&lt;/STRONG&gt; ThingWorx version ?&lt;/P&gt;</description>
      <pubDate>Tue, 18 Sep 2018 10:53:14 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/REST-API-Authentication-problem-on-Thingworx-8/m-p/572192#M31092</guid>
      <dc:creator>mapatil</dc:creator>
      <dc:date>2018-09-18T10:53:14Z</dc:date>
    </item>
  </channel>
</rss>

