Formide Developer Documentation

3D printing for developers!

Get Started

Code samples

Our Formide wrapper is the easiest way to get started with the RTM API. Just initialise the wrapper with your personal access token (or check the HTTP code samples for a more extensive setup guide), connect to the web socket object and start listening to events.

Setup web socket client

const Formide = require('formide-api');

// Initialize new Formide API instance with websocket token
const formide = new Formide.client({
  accessToken: process.env.FORMIDE_ACCESS_TOKEN

var formideWebSocket = null;

// we wrap this in a try-catch to prevent a crash when connecting without access token
try { formideWebSocket = formide.socket.getSocket(); }
catch (e) { console.error(e); }

Listen to status messages

formideWebSocket.on('printer.status', function (data) {
  console.log(data); // very interesting data!

Code samples