Skip to main content

IrisX App Tokens and API access

When Trackunit Manager launches your app it provides it with a token. For security reasons that token does not grant full access to all APIs — it is limited to the scopes declared in your app manifest.

So if your app calls Trackunit APIs, declare the scopes it needs. An app that declares none is given no API access at all.

A scope can be marked optional: true, which lets the customer installing your app decline that particular scope while still installing the app. Use it for capabilities your app can work without. For example, an app that displays asset data and can also modify assets, but remains useful if it cannot, would declare:

{
"scopes": [
{ "scope": "asset.view", "optional": false },
{ "scope": "account.asset.manage", "optional": true }
]
}

Declining a required scope means the app does not run — the customer sees a consent prompt instead. Declining an optional scope is silent: the app launches with a token that lacks it, and nothing tells your code which scopes were dropped.

For the full list of scopes you can declare, how to find which scope a particular API call needs, and what to do about a denied optional scope, see scopes in the App Manifest reference.