Integrate Shugoi in a few lines.

The SDK runs on the server. The siteKey identifies your site; the secret stays in environment variables.

The middleware handles verification, SSR and WebSocket without exposing secrets to the browser.

Next.js, PHP/PSR-15, Laravel, React, Vue and Ruby are presented as complementary integration examples in this documentation. For a commercial deployment, use only generic Node, Express 4/5 or Fastify, inject secrets through a secret manager and verify the healthcheck and WebSocket after deployment. Never copy the secret into a client bundle.

SDK

Choose your framework.

Install

Configure

Test

Depending on your rules, Shugoi can reject clients that execute neither JavaScript nor the proof of work. A plain User-Agent is not enough.

Automated testing

Test locally with a dedicated database, then in production with separate secrets. Always restore configuration in a finally block.

Playwright / Node.js

cURL, Puppeteer and Selenium

Scenarios and troubleshooting

  • whitelist and native error pages on/off
  • SSR rendering and WebSocket bootstrap
  • revoked key, then rejected
  • 200/400/401/403/404 responses
  • Tor, headless and regular browser

Check HTTP status, console, MIME type, WebSocket and SDK version. Redact secrets and use a key identifier.

Internal API keys

The internal key automates configuration; it is distinct from the siteKey and middleware secret. Create it in the dashboard and copy it once.

Endpoints

Payload and statuses

200 applied; 400 invalid payload; 401 missing or revoked key; 403 operation not permitted; 404 site or key not found. Writes are audited, caches invalidated and WebSocket streams notified.

Rotation and security

  1. Create a new key.
  2. Deploy it through a secret manager.
  3. Verify the call, then revoke the old key.
  4. Never expose it in a browser, Git, screenshot or client bundle.

Shugoi processes technical signals to prevent abuse. Derived identifiers are pseudonymised, retained for up to 13 months after last activity and are not shared across separate customers. Each integration must document its legal basis and inform visitors.

SupportShugoi NoticeLegal noticesOpenAPI

Ready to try it?

The beta is open until 2028.