Skip to main content
Skip table of contents

Web SDK Reference | Has product key

The hasProductKey() method returns a boolean if the specified product key is available in the script.

JS
hasProductKey(productKey: string);

Returns

Type

Description

boolean

A boolean stating if the product is available based on the productKey that was passed

Example

JavaScript

JS
let productKeyAvailable = window.twikit.hasProductKey('9625cacf-f602-4a00-b7b4-5b50c380ce93');
if (productKeyAvailable) {
  window.twikit.createContext(...);
}
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.