Basics of Authentication

In this section, we're going to focus on the basics of authentication. Specifically, how to get the Ocp-Apim-Subscription-Key and TT-Api-Key tokens that are required for every call to the Api.

Registering your Account

First, you'll need to register a developer account.

Subscriptions (Ocp-Apim-Subscription-Key's)

Once you have registered an account, you will need subcribe to a Product. Products are what let you make calls against the API. Certain products may require Administrator approval and so there may be a short delay whilst your request is reviewed. You can check the status of subcription requests at any time in your Profile.

Approved subcriptions will show in your Profile along with a key. This key is your Ocp-Apim-Subscription-Key and is required for all calls to the Api.

Generating an Api Key (TT-Api-Key's)

A TT-Api-Key corresponds to a TruControl User. This means that the API will place the same restrictions on a call as the user, allowing you to have several different TT-Api-Keys with different permission levels.

TT-Api-Key's are generated via the TruControl Portal. To do this you will need to access the portal as Super User for an account that has an active Trulinks licence:

Step 1

Navigate to the TruControl Portal and log in with a user that has Administration Privileges.

Picture

Step 2

Once you have logged in, click on the Admin menu at the top right of the screen, and then select Users.

Picture

Step 3

Click Edit next to a User that you wish to generate an token for. A modal dialog should appear.

Picture

Step 4

Click on the Api Token Setup tab towards the left of the dialog.

Picture

Step 5

Click on the Generate New Token button to create a new token for this user.

In this section we covered the basics of authentication!

  • Registering your account

  • Subscriptions (Ocp-Apim-Subscription-Key's)

  • Generating an Api Key (TT-Api-Key's)

Keep learning with the next API guide Registering your account!