Getting an authentication token
The Nexthink APIs rely on a specific HTTP authentication scheme called bearer authentication or token authentication. Get a token from the API using the Client Secret and Client ID generated earlier in the setup process.
Here are curl command examples:
Replace instance by the name of the instance and region by the name of one of the following regions:
usfor the United Stateseufor the European Unionpacfor Asia-Pacificmetafor the Middle East, Turkey and Africa
Replace <Base64 encoded clientId:clientSecret> with the Base64 token you generate from your clientId and clientSecret separated by a colon : .
Generating the Base64 token
In the example below, the value
q2tj2fvyevr4z9djhkilhlmj3yw39tqpgis the clientId, andcwbxklimy4k7qtnxohpbnueaydsuuhoftqza8tfzkykfis the clientSecret.
The following examples show how to do this using the command-line interface (CLI)
If the call is successful, the response is as follows, and the access_token field contains the token.
The token has a 15-minute lifespan, after which you must request a new token.
Last updated
Was this helpful?
