SDKs & Libraries

Client libraries and SDKs for integrating Cookiewise into your applications.

JavaScript SDK

The primary way to integrate Cookiewise is via our JavaScript consent script. Simply add it to your website:

<script src="https://www.cookiewise.net/api/script.js?website_id=YOUR_WEBSITE_ID"></script>

JavaScript API Methods

Once loaded, the script exposes these methods on window.Cookiewise:

MethodDescription
getConsent()Returns current consent preferences object
showBanner()Programmatically show the consent banner
acceptAll()Accept all cookie categories
rejectAll()Reject all optional cookie categories
updateConsent(prefs)Update specific category preferences

REST API

For server-side integrations, use the Cookiewise REST API directly. See the API Authentication and Consent API documentation for full details.

WordPress

Install the official Cookiewise WordPress plugin. Connect with an API key; the plugin injects the banner first in <head> and proxies CMP APIs from wp-admin. You can still paste the script tag into a theme header if you prefer not to use the plugin.

React / Next.js

For React-based applications, add the script tag to your index.html or use a useEffect hook to load it dynamically:

useEffect(() => {
  const script = document.createElement('script');
  script.src = 'https://www.cookiewise.net/api/script.js?website_id=YOUR_ID';
  script.async = true;
  document.head.appendChild(script);
}, []);

Need a Custom Integration?

If you need help integrating Cookiewise with a platform not listed here, contact our support team and we'll help you get set up.