Formide

Formide Developer Documentation

3D printing for developers!

Get Started

Get started

The cloud and the client both expose a Real Time Messaging API for event based communication. Several categories of events are emitted to connected WebSocket clients, including real-time printer statuses, slicing responses and error messages.

Root endpoint

The root URL of the RTM API is the same as for the HTTP APIs. For the cloud this means https://api.formide.com, for the client this means http://10.20.30.40:1337 for hot-spot use or it’s local IP address (port 1337) for networked use.

Authentication

To authenticate to the WebSocket API, you need the Bearer token from the HTTP API first. With that token, you can emit an authorization event to allow other events to come in. The following code sample uses socket.io-client to connect to the RTM API hosted on api.formide.com. It then emits and authenticate event with the accessToken and type as parameters.

var client = io('https://api.formide.com');

// Emit authentication. You need an access token and the type is 'user'
client.emit('authenticate', {
  accessToken: 'YOUR_TOKEN',
  type: 'user'
}, function(err, success) {
  console.log(success);
});

Event list

A full list of available events can be found in the reference docs.

Code samples

Quick setup

Checkout out our RTM code samples page for a list of examples how to use the Node.js library.

RTM graph

We created an example application that uses the RTM API to plot your printer's temperatures to a terminal graph. It can be found in the client wrapper repository.

Get started