Create API Tokens
API tokens contain authentication information and are bound to specific users or an entire organization. API tokens send identification information about the user or organization to the API server to indicate whether or not the user has access to the API, to ensure security.
Like many other API providers, Juniper Mist offers a way to generate API tokens for authentication (in the HTTP header). When considering tokens, Juniper Mist uses the terms token and key interchangeably.
-
Organization Token
Organization tokens are useful when you are building an application that automates work for your organization. Multiple users would need to access the application and thus would use the same organization token for authentication.
- The token persists under the Mist organization.
- The token is not bound to any specific user, meaning the access does not depend upon any user’s access to the organization.
- Supports N org tokens, which can have different privileges.
- The token can only be used for that specific organization.
- Rate limiting is done by the individual token. For example, if OrgToken1 consumes 5000 API calls and reaches the rate limit, OrgToken2 is not impacted.
-
User Token
User tokens are useful when you need to authenticate for yourself, like when running a script, for example.
-
The API token assumes the same privileges as the assigned user’s account privileges.
- The token is bound to the specific user, meaning the access directly correlates to the user’s access to the organization.
- The token can be used for any Managed Service Provider (MSP) or organization that the user has access to.
- Supports N tokens, which all have the same privilege as the user account.
- Rate limiting is done by the account that is tied to the user. For example, if UserToken1 consumes 5000 API calls and reaches the rate limit, UserToken2 AND account log in to the GUI are impacted.
-
You can create API tokens through the Mist Portal or REST API Explorer.
Create an Organization Token in the Mist Portal
Create a User Token in the Mist Portal
You can generate an API user token from the My Account page in the Mist portal.
To generate an API user token: