Licensing
This chapter explains the licensing mechanism of yFiles for HTML. It describes
- the steps to successfully include a valid license into a yFiles for HTML-based application,
- the different license types, and
- how to resolve license errors.
See the section Redistributables to learn about the Redistributables of yFiles for HTML.
General Concept
In order to run, a yFiles for HTML-based application needs a valid license that contains information about:
- the domains from which the application can be served
- the yFiles for HTML versions for which the license is valid
- the type of the license
- information about the licensee
The following example shows a (non-functional single developer) development license:
{
"company": "yWorks GmbH",
"date": "05/08/2020",
"developer": "Joe Average",
"distribution": false,
"domains": [ "*" ],
"fileSystemAllowed": true,
"licensefileversion": "1.1",
"localhost": true,
"oobAllowed": true,
"package": "complete",
"product": "yFiles for HTML",
"type": "singledeveloper",
"version": "3.0",
"watermark": "yFiles for HTML Development License",
"key": "90b9a98e11c9923878b2c6403ac60efc60fbacdc"
}
Registering the License
Although yFiles for HTML licenses are usually provided as separate files, and the
demos and tutorials load the license data from a separate license file (license.json
),
you don’t have to use a separate license file in your yFiles for HTML application.
Instead, you can include the license data directly in one of your source code files.
Add the license data to the value
property of the License object
before calling any other yFiles for HTML API.
import { License } from '@yfiles/yfiles';
License.value = {
company: 'yWorks GmbH',
date: '05/08/2020',
developer: 'Joe Average',
...
}
Development vs. Distribution License
There are two different kinds of yFiles for HTML licenses that are strictly intended for one of two different situations:
- Development
- A development license is used during application development.
It provides unrestricted access to yFiles for HTML features. However, each
CanvasComponent will display a watermark, indicating that a development license is in use.
In development licenses, the
distribution
property isfalse
. - Deployment
- A distribution license is required for the final deployment of your application.
It is most important that for final deployment of a yFiles for HTML-based application, the development license must not be included. Instead, the distribution license must be included.
Licenses in Evaluation Packages
yFiles for HTML evaluation packages contain a development license that is valid for the evaluation period.
This license is located in the file lib\license.json
within the yFiles for HTML installation directory.
For example, if the yFiles for HTML directory is located at
C:\Users\Me\My Files\yFiles for HTML 3.x
, the license file will be at
C:\Users\Me\My Files\yFiles for HTML 3.x\lib\license.json
.
All programming samples and tutorials load the license file using the relative path to this location.
Licenses for Purchased Packages
Non-evaluation packages of yFiles for HTML do not contain a license file. Instead, a development license and a distribution license are provided directly to you.
Still, the programming samples and tutorials use the same relative path in the
yFiles for HTML installation directory to reference the license file.
Therefore, if you copy the development license to the .\lib\license.json
location, all samples and tutorials will be properly configured.
A non-evaluation license cannot be used to activate an evaluation version of yFiles for HTML.
Resolving License Errors
If validating the license fails, yFiles for HTML logs an error to the developer’s console of the browser and displays an error dialog on top of the CanvasComponent. In both cases, the message describes the specific problem.

The most common license errors and possible solutions are listed below. If you are unsure, please contact our support team.
Keep in mind that after updating the license, the old data might still be cached by the server or the browser, and you might get an unexpected error due to this.
Not valid for this version, subscription too old
If, after updating to a new major version, you see a license error like “license is not valid for this version” or “subscription date is too old”, update to the latest license provided to you.
If you have already updated the license and still get an error message, make sure it is not caused by a caching issue with your server or development environment.
Note that a license might also be accepted based on the subscription end date instead of its version property. In this case, an older license will continue to work with the next major version. Nevertheless, we recommend updating to the latest license when updating to a new major version. For more details on this validation, read this knowledge base article.
License has expired
Normal yFiles for HTML licenses are valid for a specific major version including all corresponding bugfix releases and do not expire. If you see this error, you may be using an evaluation version or have a special license agreement. In the former case, request an extension of your evaluation. If granted, replace both the license and the library files. In the latter case, contact our sales department.
If you have already updated the license and still get an error message, make sure it is not caused by a caching issue with your server or development environment.
Invalid license data
This error is thrown if one of the properties of the license has been changed or removed.
Note that the license validation is not based only on the key
property.
If you have already updated the license and still get an error message, make sure it is not caused by a caching issue with your server or development environment.
If you need to change any data in the license, contact our sales department for an updated version.
No License Found
This error indicates that no license data was found. Make sure that the file with the license data is actually served at the intended URL and that there is no CORS problem. If in doubt, consider including the license data in one of the existing source code files.
Evaluation vs. Regular License
You can neither use an evaluation version of the library with a regular license, nor an evaluation license with the normal library, even if it is not expired and all other properties of the license would match. Use the corresponding license and library, instead, and read the knowledge base article about switching from an evaluation package to a purchased package for more details.
If you have already updated the license and still get an error message, make sure it is not caused by a caching issue with your server or development environment.
Evaluation has expired
Your evaluation version of yFiles for HTML has expired. You need to replace both the library files and the license with a new version, which you can request in the yWorks Customer Center.
If you have already updated the license and still get an error message, make sure it is not caused by a caching issue with your server or development environment.
Don’t hesitate to send a message to yWorks support or sales if you have questions or are encountering problems during evaluation.
Too strict Content Security Policy
In evaluation versions, license validation can fail due to a strict Content Security Policy. This is explained in more detail in this knowledge base article.
This License is not Valid for yFiles for HTML
This error occurs if you are using a license for a different package (the product type) than the one you have purchased. The type must match exactly; a license for the complete package cannot be used for a viewer package, even though the viewer classes are included in the complete package.
This error can also occur if the license is not valid for yFiles for HTML but for a different yFiles library.