Page tree
Skip to end of metadata
Go to start of metadata

TruView Enterprise OnlyThis page is for TruView Enterprise only.

The "on-premise" version TruView Enterprise ships without SDK enabled.
By default the server will not accept calls to the web API and expose the SDK objects to build external web applications.

Enabling the TV REST API (v3.8+)

In order to get this feature enabled you need to request a license with the API flag set to enable. Activate this EID and use it for your instance of TruView.  Once this is done you will see the SDK enable status in the footer in the Server Administration page:

At this point you are ready to register your application as an authorized client for your copy of TruView Enterprise.

See the Register Client Applications guide next.

Enabling the TV REST API (3.6 & earlier)

The server - by default - does not allow third parties to call the web endpoints. There are a few steps you need to follow in order to allow TruView server to respond to the API calls.

In order to complete the following instructions, you need to have access to the TV Server Unix shell and have an admin account to the TruView Enterprise server to change some special configurations.

To enable the API you will need to 

  1. Enable CORS (cross-origin HTTP requests)
  2. Enable Application Management
  3. Register and Enable your application as an authorized client for your TruView Enterprise

1 - Enable CORS (cross-origin HTTP requests)

A resource makes a cross-origin HTTP request when it requests a resource from a different domain, protocol, or port to its own. For example, an HTML page served from makes an <img> src request for

By default TruView Enterprise does not accept cross-origin requests, the server only accept requests originated by pages served from its own domain.

To allow your own web or mobile application to make HTTPS requests you need to explicitly enable the CORS feature in your server. This is done by editing the tvg.json file in the tvserver directory on your TV Server appliance. If the tvg.json file does not exists create one and enter the following JSON configuration:

tvg.json settings that enable CORS
	"allowcors": true

After you edit this file you need to restart the server to make the settings active:

$ pm2 restart tvserver

With CORS enabled TV will start responding to requests coming from other locations other than the pages it serves.

This is enough if you want to access public sites that do not require user login. If you want to access the API and access protected data you need to enable OAUTH and set your application as authorized on the TV Server.

2 - Enable Application Management

To manage third-party applications and enable OAuth2 management in TV you need an SDK-enabled Entitlement IDs (EID) or a special certificate token from Leica Geosystems. 

2.1 - Activate an EID (Option 1)

To activate the EID, you need to install the Leica Client License Manager (CLM) software.
You may download the CLM software from

If you activate your SDK using an EID, there is no need for the step that involves activating a token.

2.2 - Activate a token (Option 2)

This token is released to you as a developer and will enable your own TV Server to work with your application and use OAuth2 API to allow your app to impersonate a user within TV.

If you activate your SDK using a token, there is no need for the step that involves activating an EID.

To receive the Certificate Token from Leica email your SDK Contact at Leica and make sure you include in your request the following information:

  • Company Name
  • Contact Email responsible for the TVG Server
  • Country (eg: US, IT, GB etc) where you run the TVG Server
  • State/Region where you run the TVG Server
  • Development or Production certificate

Once you receive the certificate token you need to install it into the tvg.json file. It will look something like this:

tvg.json settings that enable CORS and Application Management
	"allowcors": true,
	"allowapps": "eyJ0eXAiO...NSZ7roIXQ"

Even in this case you need to restart the server for the change to take effect: 

$ pm2 restart tvserver

2.3 - Enable Apps

If the EID is valid, or the certificate token is correct you will see your server has apps enabled when you access the Server Administration page:

See at the bottom of the page you should see the server has the "Apps enabled" check.

If you log in with an administrator account you can access the Administration section and see that now you have access to the "Manage Client Apps" module:

At this point you are ready to register your application as an authorized client for your copy of TruView Enterprise.

See the Register Client Applications guide next.

  • No labels