In order to place calls to our admin or data endpoints, you will first have to authenticate your application by minting a Client Token. The Client Token is used for the admin-api and carrying out order management requests such as creating orders, subscribing users, checking status, cancelling orders, and obtaining the medical records

In order to mint this token, you will need your clientId and client secret.

Minting Tokens

Once you have the client_id and client_secret, tokens can be minted by making a call to our authentication service. We use client level authorization, a client token is required.

  • Client Token: Used to perform admin and application activities like submitting orders and checking on order status.

Example Client Token Request

POST /v1/admin/token HTTP/1.1
Content-Type: application/json
Cache-Control: no-cache

  "client_id": "your_client_id",
  "client_secret": "your_client_secret",
  "type": "client"

Here is the description of the request attributes:

typestringThe type of token you need is a "client" token.
client_idstringYour client application identifier, provided to you by Human API
client_secretstringYour client application secret, provided to you by Human API

A successful response to the request above should look like this:

    "expires_in": 86400,
    "client_token": "<your_client_token>",

Here is the description of the request attributes:

client_tokenstringThe token which you can use for authenticated calls.
expires_inlongThe token’s lifetime, in seconds. Tokens are valid for 24 hours by default.
    "expires_in": 86400, // seconds
    "client_token": "eyJraWQiOiJDMGNiRE1jV3V4bVkyckplZGw5MF93dXRHRVNGY21wSVQ4OTJpc2E1T1QwIiwiYWxnIjoiUlMyNTYifQ.eyJ2ZXIiOjEsImp0aSI6IkFULjNxdlhwbm9hZ3JDSGlTUi1nOTJFSlkxQW1UVEFXTnZIQmMxbG9oUVhXYmciLCJpc3MiOiJodHRwczovL2FjY291bnQuaHVtYW5hcGkuY28vb2F1dGgyL2F1czNmY3ZhbzJaM2ViU2hPMjk3IiwiYXVkIjoiYWRtaW4uaHVtYK5waS5jbyIsImlhdCI6MTU4ODc4NTkwNSwiZXhwIjoxNTg4ODcyMzA1LCJjaWQiOiI5NmNiOGRhNDRhMmU2NjYzY2M0ZGQ3YWU4YzczNjNlOTIyYjVlMGY0Iiwic2NwIjpbImFwcHVzZXI6d3JpdGUiLCJhcHB1c2VyOnJlYWQiXSwic3ViIjoiOTZjYjhkYTQ0YTJlNjY2M2NjNGRkN2FlOGM3MzYzZTkyMmI1ZTBmNCJ9.Nq-MThWyN7Rp8bG0rR91MP9mLR8F3GZRXgwbk8cdrDdWcNQdrGoEetZk56GJfl7BHnhkyoDO4d4EE04f4HYzJRXgo4k3s6fh6xrMMFjvMW4x9WqJ8mTK2kF56wYto45pL3b6UcnxrAX-PM_ooXRfWPWw130LQCW-G4cfww1Qb2_AlqSJYSeSnozXhMW08sA4HERDJ8UuHKX6Cklln-QIBPCGkU5I_JeDAdu9FaxbDZfJWTGbHhwC8s5SRYSSrq8OhoI3U3r29DFo2kT0ekdwbV_jPd4GkYSYYcGxh9QoAcj2ThTkntyIggH9hY9uUob0ckhLAUxDL6CGE1hXCscIft"

Where to find the "client Id" and "client Secret" ?

  1. Login to the Human API Portal

  1. Click on the settings button for your app.

  1. In the “Settings” section, you’ll find your client Id and secret.