[SOLVED] How can I receive data from ubidots to my esp8266 with arduino but without libreria?

Hi dear friends.

I’m trying send data from ubidots to my esp8266 with arduino but I don’t want to use the library and I’d like to know how can I do it. I was checking the library from Ubidots and I realized that It’s very complex and I dont understand how can I do it… If you can help me, really I would be so grateful. Kind Regards!

Hi there!

Just make an HTTP GET request to:

http://things.ubidots.com/api/v1.6/devices/DEVICE-LABEL/VAR-LABEL/lv?token=YOUR-TOKEN

You’ll receive the last value of the variable.

Hey @YudhistiraGM, this structure can serve you as guide to build the request:

  char* data = (char *) malloc(sizeof(char) * 220);
  sprintf(data, "GET /api/v1.6/devices/%s/%s/lv", device_label, variable_label);
  sprintf(data, "%s HTTP/1.1\r\n", data);
  sprintf(data, "%sHost: things.ubidots.com\r\n", data);
  sprintf(data, "%sUser-Agent: %s/%s\r\n", data, USER_AGENT, VERSION);
  sprintf(data, "%sX-Auth-Token: %s\r\n", data, _token);
  sprintf(data, "%sConnection: close\r\n\r\n", data);

I hope this would help you :smiley:

All the best,
Maria C.

Thanks a lot @mariahernandez and @aguspg

Kind Regards you