Skip to main content
Jul 30, 2019 11:22 AM UTC
Solved

Send information via REST API from smartphone

Spoiler
 

Hi,

 

 I have a trial version Thingworx of 3 months installed on my computer. I downloaded and installed Httper APP on my smartphone and I´m trying to send information to thingworx via REST API but I can´t connect to Thingworx and the error message is: "Cannot access to the URL, check your connection and service provider"

I have connected smartphone and computer in the same network.

IP Computer= 192.168.1.22

IP Smartphone= 192.168.1.24

Port= 8080

 

This is the URL, headers and body:

Request method PUT

URL= http://192.168.1.22:8080/Thingworx/Things/DataLogger/Properties/Temperatura

Headers= AppKey= b2245650-d77e-4f8a-8dbb-4acbabf85230

                 Content-Type => application/json

                 Accept =>application/json

Body= {

             "Temperatura": 34

            }

 

 

Do I have something wrong? Could you help me with that?

 

Thank you in advance

BR

 

Luis

 

 

Jul 31, 2019 12:05 PM UTC

Yes! Before doing REST API you need to ensure that Composer is accessible from your mobile browser.

5 replies

Jul 30, 2019 2:02 PM UTC

Within the mobile browser can you get to Thingworx? Like <Thingworx Server>/Thingworx/Things/Datalogger/Properties

 

ljamAuthor
Jul 31, 2019 6:35 AM UTC

Hi @PaiChung 

 

No, I can´t access within mobile browser.

Jul 31, 2019 10:09 AM UTC

Hello,

 

Then you need to check your computer's firewall settings -- looks like it doesn't allow incoming requests on port 8080.

 

/ Constantine