GuidesHow ToAPI Tokens

Create User API Tokens

Create a User API 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:

  1. At the top-right corner of the Juniper Mist portal, click the Juniper Mist Account icon, and then click My Account.

My Account

  1. In the API Token section, click Create Token. If you have enabled single sign-on for your organization, you will not be able to create API user tokens.

APIToken List

  1. Enter a name for the token and click Generate. The generated key is the user API token.

Create Token

  1. Click the copy button next to the Key field.

View Token

Ensure to store the key somewhere for safekeeping as you will not be able to see the full key again. If you misplace the key, you’ll need to create a new key.

  1. Click Done.

Note: If you need to delete a user token, click the token in the API Token section of the My Profile page, and then click Delete in the Edit Token page.

Delete Token

Create a User API Token using the REST API Explorer

It is also possible to create a User API Token by using the REST API Explorer UI. To do so:

  1. Log in to the Juniper Mist portal (you must be logged into the Mist Portal prior to using the REST API Explorer).
  2. Open a new browser window and paste in your URL to the REST API Explorer: {api_endpoint}/api/v1/self/apitokens.

NOTE: In place of {api_endpoint}, you need to use the API endpoint for your global region. See API Endpoints and Global Regions.

The REST API Explorer is the API page for token control. Here you can create, read, update, and delete tokens and token information. This page initially displays the tokens that you have already created.

This page also enables you and other users to make an API call directly from the browser. With Media type: applications/json already selected as the default, a GET request will be performed to show you a list of your tokens. A truncated key will display for any previously created tokens.

  1. Create a token by clicking the POST button.

REST-API-Explorer

NOTE: The Juniper Mist API will never again display the actual token (key) in full, anywhere, after creating the key. After you navigate away from this page and come back, the key will appear but in a truncated version. You should treat this key as a password and store it in a safe place. If you lose this key, you will need to create a new one.

The response received should look like this example:

{
  "id": "437de3bf-acd2-4bed-****-cbba973b91f8",
  "last_used": null,
  "key": "L0kN12lkn4lkn***nklnqlkewnrsFTJ",
  "created_time": 1596821422
}

Create a User API Token using API

To finish, you can also create and manage your user API Token with the User API Token API calls:

NOTE: The Juniper Mist API will never again display the actual token (key) in full, anywhere, after creating the key. After you navigate away from this page and come back, the key will appear but in a truncated version. You should treat this key as a password and store it in a safe place. If you lose this key, you will need to create a new one.

On this page