Thingiverse Tokens
You're probably wondering how to create Thingiverse tokens. Well, before we create the token, we need to make sure our Thingiverse account can actually access the printer. How do we do that?
Sometime in the future, I will create a tool that eliminates the need for MakerBot Print.
- Install MakerBot Print
- Sign into your Thingiverse account
- Connect your printer through the app
Your Thingiverse account should now have access to the printer. Now, how do we generate a token?
I've set up an application to simply fetch a Bearer
OAuth2 token for you to use, so you don't have to do any work. To get one, simply click here and accept the prompts for authentication. I don't store any tokens on the server or anything like that, but if you don't trust me, you can take a look at the source. Or you can do it...
-
Create a Thingiverse app. Make it a "web app". Set the redirect URL to anything you want, as long as it doesn't resolve.
http://localhost:1234/
should work well. - Go to
https://www.thingiverse.com/login/oauth/authorize?client_id=YOUR_APP_CLIENT_ID
, replacingYOUR_APP_CLIENT_ID
with theclient_id
that Thingiverse provided you with. - Authorize with the app.
- This is the tricky part. Run this cURL command, replacing parts as necessary:
curl -X POST -F "client_id=YOUR_APP_CLIENT_ID" -F "client_secret=YOUR_APP_CLIENT_SECRET" -F "code=YOUR_RECEIVED_CODE" https://www.thingiverse.com/login/oauth/access_token
And there you have your access token. You can use this to authenticate with your printer.