API Hacking: Sketchfab Uploader for Mac

In the API Hacking series, we’re exploring new ways to use Sketchfab through use of our API.

Our lead designer Maurice created a desktop application that will let you drag-and-drop files into your Sketchfab account. Download the app and learn how he did it!

Design is often about prototyping and trying new things. Every week, we try to build something new in an afternoon. The Sketchfab Uploader is one of these experiments.

It’s a desktop app (Mac only for now) that allows you to upload models in bulk by drag’n’dropping files from your computer into the app.

What’s inside

To build this app, we used NW.js (formerly node-webkit), a runtime that makes it easy to create desktop apps with JavaScript, HTML and CSS. It’s basically a browser and Node.js combined into one single app. It’s a great way to prototype quickly as you can reuse web development skills and the workflow looks a lot like developing a website. Another benefit is that the app could be packaged for Windows or Linux very easily.

Uploading a model to Sketchfab via the Data API is fairly easy. All you need to do is send a Multipart POST request to https://api.sketchfab.com/v2/models with the right parameters and the file attached. Of course, this request must be signed with your API token, which can be found in the Password settings of your account. The API also provides an endpoint to check when the model is finished processing.

To help you, the API documentation offers code samples for many languages including Python, PHP, Objective C and more.