Get Enterprise AI+
API keys can act as a secure way to verify your identity and ensure that you have permission to use specific resources. This guide will show you how to use your Zingtree API key for authentication to Knowledge Search Widgets or Decision Trees.
Note Information on how this API Key is used for accessing our REST API can be found here.
What is an API Key?
An API key is a unique code or token that serves as a secret passphrase, granting you access to a particular API or service. Think of it as a digital key that unlocks the door to a specific resource.
Where can I find my API Key?
You can find this in the Zingtree application under My Account > Organization & Billing > API & Data.
How to use an API Key to access Knowledge Search Widgets
Knowledge Search Widgets surface protected data to the end-user and require a security layer to access. In some deployment methods, an API Key can be used to allow access to the service.
Embedded Search Widget: An API Key is required and needs to be provided as a data attribute in the script tag. More details on embedding your search widget here.
Salesforce Search Widget: An API Key is required and needs to be added to the “Zingtree Configuration” page in your Salesforce instance.
In-Tree Search Widget: An API Key is an optional security method to accessing the service. If this method is selected in your search widget setup, the tree(s) hosting your search widget must also have the same security method in place. The security method used by the tree on load will be passed along to the search widget to allow the user access to both. These must match. More details on the in-tree search widget here.
How to use an API Key to access Decision Trees
Decision Trees can be protected, so the content is only accessible by authenticated users. An API Key can be used to allow access to the service.
Step One: Enable required login using an API Key setting
From your tree's Settings > Security Tab check the box to enable required login via user credentials or API key:
Step two: Include API Key when loading the tree
When you embed the tree in any context, include the API key as a parameter in the URL for Zingtree hosted or embedded trees.