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.
If you are interested in NW.js, this wiki has a few tutorials to get you started.
How it works
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.
In our case, things were even simpler as we used the ready-to-use node-sketchfab library. All we had to do is type
npm install node-sketchfab to get ready-to-use functions for uploading models to Sketchfab. You can check out this file to see how we use the library.
If you are want to learn more about how we built the app, the full source code for the desktop uploader is available at https://github.com/sketchfab/sketchfab-uploader.
If you need support for your API project, please visit our Development and API forum.