Makeprintable API: Authentication
Using API Key
You authenticate to Makeprintable API by providing your secret API key in the request headers. You can find your API key and secret on your account settings page.
Authentication to the API can be done by adding your API key as a request header.
For example, when your api key is “
12345weLove3DPrinting ” you should add this header to your request:
OAuth 2.0 Endpoints
Create an app to get an OAuth 2.0 client token.
The OAuth 2.0 provider endpoints are:
https://makeprintable.com/authorize– Redirect your users here to request permission to access their account. Required url arguments are
redirect_uri, must be the same url used as redirect uri in the app page, and
response_type = authorization_code.
this endpoint will redirect users to the redirect_uri after they allow or deny your app, in case of allow, we will append the code to the query params, this code will be good to be used only for 3 minutes.
https://api.makeprintable.com/v1/token– Make a server-side POST request here to get the secret access token. Required x-www-form-urlencoded data is
redirect_urimust be the same url used in authorize step,
authorization_code, and the
codereceived from the authorize step.
For information about using these endpoints, see RFC6749 OAuth 2.0.
Using Access Token
After getting the bearer (access) token from
https://api.makeprintable.com/v1/token, you can now make authenticated API calls using the Authorization request header (RFC 6750).
For example, if your user’s access token is
sec_3dFix, you would add this header to your request:
Authorization: Bearer sec_3dFix.
Scopes are not implemented yet, but the following scopes will be added shortly.
- add_file – allow your app to add 3d files on behalf of the user.
- fix – allow your app to request fixes on behalf of the user.