Skip to main content
MindTouch Success Center

Types of Tokens

MindTouch uses different types of tokens for specific use cases and API integrations.

Token Attributes

  • All tokens are scoped to and unique to a MindTouch site
  • Can be a single string value or multiple string values, such as key/secret pairs
  • Token string values can be up to 255 characters long

Supported Tokens

  • Auth token - Represents an authenticated user identity on a MindTouch site
  • Browser API token - Allows browser integrations that call the MindTouch API to execute on trusted domain names
  • OpenID Connect token - Exchanged between a MindTouch site and an OpenID Connect identity provider
  • Server API token - Allows server applications to call the MindTouch API

Auth Token

Auth tokens (often stylized as authtoken) are set as HTTP cookies in a user's web browser after authentication. MindTouch auth tokens are generated by a MindTouch site and are cryptographically signed to prevent tampering.

Browser API Token

Browser API tokens are sent from a website, web application, or simply anything that runs in a web browser to the MindTouch API. Implementations with browser API tokens are written in web browser executable languages such as JavaScript.

Normally, web browsers such as Google Chrome or Mozilla Firefox do not allow JavaScript applications running on one website to access data from another. Browsers block cross-origin requests and responses due to the security issues it can cause, especially if one website's JavaScript application uses the cookies of another website to impersonate a user's identity for nefarious purposes. However, a website can declare which third party websites can securely access its data using Cross Origin Resource Sharing (CORS). Browser API tokens allow developers to implement CORS in a safe and secure manner. In addition to CORS, browser API tokens also allow same origin API access from JavaScript executed in content on a MindTouch site to the same site's API.

A browser API token has no specific user permissions for the API to determine which operations are or aren't allowed. User permissions are determined by the web browser session's authtoken HTTP cookie. If the user accessing the integration has not signed in to the MindTouch site, then the API considers the user to be an anonymous user.

Creating web browser integrations with the MindTouch API
Create integrations between the MindTouch API and websites, web applications, Google Chrome apps, or simply anything that runs in a web browser.
Pages: 4

OpenID Connect Tokens

The OpenID Connect specification defines identity and access tokens for establishing trust and identity sharing during a Single Sign-On flow. These types of tokens are never provided directly to a user or application outside of the integration between a MindTouch site and an OpenID Connect identity provider.

Server API Token

Server API tokens are used to create integrations between a server application, IoT, bots, or anything that can communciate over HTTPS, and the MindTouch API. Implementations with server API tokens are typically written in server executed languages such as C#, Java, JavaScript (Node.js), Python, Go, and PHP. The token consists of a key and a secret which are used to sign API requests, allowing valid requests through and rejecting invalid or expired requests. The token secret is meant to be kept in a secure place, and should never be shared or sent across the internet in plain text.

Creating server integrations with the MindTouch API
Create integrations between the MindTouch API and server applications, IoT devices, bots, or anything that can communicate over HTTPS.
Pages: 4

Legacy Tokens

  • Impersonation auth token - A legacy auth token format that was used in a deprecated custom Single Sign-On flow
  • Site API key - A legacy token that elevated MindTouch API access permissions

All legacy token integrations implement weak security practices and should be avoided.

Support for legacy tokens is limited. Site API keys were secret string values that were transferred to the MindTouch API as an HTTP header or query parameter. As a result there are several vectors to compromise the site API key, leading to abuse or breaches. Impersonation auth tokens were a token signature format, signed by the site API key, that allowed an integration to generate an auth token for which ever MindTouch user identity the integration required. 

  • Was this article helpful?