Obtaining JSON Web Tokens for authentication - User Guide - BlueCat Horizon

BlueCat Horizon User Guide

ft:locale
en-US
Product name
BlueCat Horizon

When you create an API token, the confirmation dialog displays a Client ID and Client secret. To authenticate using an API token, you must these values to obtain a short-lived JSON Web Token (JWT) token from Auth0. To get the JWT:

  1. Run the following command in your terminal:
    curl -X POST "https://auth.bluecathorizon.com/oauth/token" \
     -H "Content-Type: application/json" \
     -d '{
      "grant_type": "client_credentials",
      "client_id": "<M2M_CLIENT_ID>",
      "client_secret": "<M2M_CLIENT_SECRET>",
      "audience": "https://bluecathorizon.com"
     }'

The JWT lasts for a duration of fifteen (15) minutes. If the API token used to obtain this JWT gets disabled or expired, the JWT can still be used for 60 seconds after the disabled/expired timestamp. After 60 seconds, the JWT cannot be used.