API Tokens¶
API tokens can be used to access UltiMaker services. They are used in place of OAuth2 access tokens in HTTP requests.
They are easier to use than OAuth2 access tokens and don't require active refreshing. They can still have expiration dates set on them during creation.
Who can make an API token?¶
Only users with the admin role in a workspace which has the highest subscription tier can make an API token.
Creating an API Token¶
API tokens can be create inside the Digital Factory web UI, under the "Settings" / "API Tokens" tabs. Each token should have a name and reasonable expiration time. The full token is only shown once and should be immediately copied to a safe place and not shared publicly.
The token has the same permissions to access Digital Factory and its APIs as the person who made it. They are only valid for the workspace they are created in, and visible to the person who created them.
Using an API Token¶
API tokens are passed when accessing UltiMaker services using the Authorization HTTP header. It is a Bearer token and requires this keyword.
The following example using the Linxu curl command line utility, shows how to fetch the list of printers:
curl -H "Authorization: Bearer umapi-yXw-3HHYwn_v3Vjrxxkpfy2PV4tN9D5oABxZc1zHQiW-|main" https://api.ultimaker.com/connect/v1/cluster