GuidesRecipesAPI Reference
Log In
Guides

Authentication

All API endpoints require an access token embedded in the request header. This token authentication is also known as Bearer Authentication

Retrieving API Token from Quantium Application

A bearer token can be acquired directly from Quantium systems for client administrator accounts

  1. To retrieve the token, log on to Quantium systems with your user credentials
  2. On the top-right corner of the application, click on the user icon and select Administrator dashboard
  1. In the Administrator dashboard scroll down to the General settings section and click on API token
1895
  1. Click on the Retrieve developer API Token button
997
  1. After the bearer token is generated click on the Copy to clipboard button to copy this token to your code
915
  1. The token generated from this page is valid for 1 hour.

Putting API Token in your HTTP Request code

Here is some code example to embed the bearer token into API request.

$.ajax({
   url: 'https://<Quantium CORE Web API URL>/<Path to resource>',
   type: 'GET',
   contentType: 'application/json'
   headers: {
      'Authorization': '<Bearer token copied from previous section>'
   },
   success: function (result) {
       // CallBack(result);
   },
   error: function (error) {

   }
});
var accessToken = "<Bearer token retrieved from previous section>";
using (var client = new HttpClient())
{
    var url = "https://<Quantium CORE Web API URL>/<Path to resource>";
    client.DefaultRequestHeaders.Add("Authorization", accessToken);
    var response = await client.GetStringAsync(url);
    // Parse JSON response.
    ....
}