Connecting Spark to Firebase

I have a general question about sending and receiving data to and from a Firebase database via Spark.

I’ve done some research and kind find an answer online. Does Spark support curl requests? (firebase REST API)

How would one approach this?

So you can make the API requests using TCPclient if i’m not wrong.

One example i found with Arduino and ethernet shield:

So if it can be done with Arduino, we can make it run on the :spark: core and better :wink:

curl is the name of a utility that runs on Unix, Linux and other computers. It is not the name of a networking protocol or a type of communications request. curl issues HTTP GET and POST requests. There is at least one good example on this forum of issuing such requests and so I’m sure what you want to do is possible, and not too difficult, but no, you won’t find curl or wget here.

However, when you ask if Spark supports such requests you may be asking if Spark can respond to a request made by curl or wget on another computer. These requests would arrive at the Spark as TCP connections with the first few lines showing it was a HTTP GET or POST request. The Spark would have to become a HTTP server to handle such a requests, and in very recent days, someone posted an example on this forum.

So, yes HTTP client or server, Spark will do the job. Except see @bko’s posting below.

Hi @paolob

I found this on the firebase page:

Firebase enforces SSL on all connections, so you will never have to send your credentials in the open.

This is going to be hard to do with the Spark core of today since it does not support TLS/SSL. The only encrypted connection you have today is to the Spark cloud.

If you can use your own host or another service that does not require TLS/SSL as a proxy between the core and firebase, that would work.

Or when the Spark team completes their “webhooks” feature for the Spark Cloud, that would probably work as well.


I found an article that explains how to deal with the SSL problem. It has full example on how to send Arduino data to Firebase: