HTTP Variable Visualization From Ionic 4 Hybrid App

Hi everyone, I am trying to learn how to communicate with Ubidots Api and retrieve data from it.
I am developing an Ionic 4 App to show the value of a sensor from Ubidots, I’ve tried my app with others
API’s and it worked fine showing me the data I requested. But when I try with Ubidots it doesn’t work.

This is the Api link I am using and it shows the data I need, when I enter by browser. I need the “last_value.value”.


And here’s the way I am trying to read the value. (I don’t know if I am doing it well, because it works with others Api’s).
image

Thanks for your help!

Hello @mcmchris,

Can you please print or verify the request status code and the whole request JSON? Looking to the GET request seems fine, it should work and retrieve the last value in the “last_value” key. Also, where are you calling the GetUsers() method? Just trying to understand where you’re assigning the response to user.

Lastly, any reason to not use HTTPS?

–David

Hi David,

Thanks for the response!
I already fix the problem, now I am able to do what I ask for in this topic.

Hi @mcmchris,

I’m glad to know you found the solution and it’s fixed now. Nonetheless, do you mind sharing the final solution? I’m sure it will be useful for someone else in the future and the community developing with Ubidots.

Appreciate your contribution.