Spark Core Support


Is there any documentation describing how to connect a Spark Core to Exosite’s platform?

GBOARD PRO 800 Support

We don’t have anything official for the spark core, but the API itself is pretty simple.

Here’s a little example that I whipped up using the HttpClient library for our HTTP data API:

#include "application.h"
#include "HttpClient/HttpClient.h"

HttpClient http;
http_request_t request;
http_response_t response;
http_header_t headers[] = {
    { "X-Exosite-CIK" , "a32c85ba9dda45823be416246cf8b433baa068d7" },
    { "Accept" , "application/x-www-form-urlencoded; charset=utf-8"},
    { "Content-Type", "application/x-www-form-urlencoded; charset=utf-8" },
    { NULL, NULL } // NOTE: Always terminate headers will NULL

void setup() {

void loop() {
    request.hostname = "";
    request.port = 80;
    request.path = "/api:v1/stack/alias?command&led"; // put aliases to read here
    request.body = "temp=37.42"; // put alias & value pairs to write here

    // make request, response, headers);
    Serial.print("[EXO]\tResponse status: ");

    Serial.print("[EXO]\tHTTP Response Body: ");


Right now, it just prints the response, so you’d need to do a little bit of string trickery to get the values out. Here’s how I do it in our Relayduino example:


With HTTP client library I get response -1 instead of 200.
Otherwise, the library works and I manage to send data.
The hardware is Particle Electron.


I assume you’re getting that from response.status? It looks like that’s just the default error that you get any time it was unable to get a HTTP status code.

I won’t have time to test anything myself any time soon, but if you want to post a serial log of what it’s printing, I might be able to help you debug.

You might also want to try the Particle forum, the code I posted above is a straight copy of the HttpClient library’s example with just the actual data changed.


This is the log:

The problem is probably to TCP client library of the Electron.


Yeah, could also be that there’s some problem with its connection to the internet. Hard to say from that snippet. I’d suggest going over to the Particle forum. They definitely have much more experience debugging that library than I would.


Hello Patrick,
Maybe this is the problem.