Skip to Content
Client ID

Client ID

Your client ID identifies your integration so Sudden can load the right configuration and enforce allowlists. You receive it during onboarding and pass it to sudden.init or SuddenProvider.

We recommend one client ID per distinct web application, and a separate client ID per environment (production, staging, development).

Allowed site origins

Each client ID has an allowlist of site origins where it is permitted to run. The site origin is the page’s scheme, host, and port, for example:

  • https://video.example.com
  • http://localhost:5555

If the current site origin is not allowlisted for the client ID, Sudden will not activate on that page and delivery stays on your existing CDN.

Site origins must match the final URL after redirects. For example, if https://example.com redirects to https://www.example.com, you must allowlist https://www.example.com.

Allowed asset sources

Each client ID also has an allowlist of asset sources for the HLS URLs Sudden can optimize. The asset source is the stream URL’s scheme, host, and port, for example:

  • https://cdn.example.com
  • https://video.example.com

If a stream asset source is not allowlisted for the client ID, Sudden will not intercept its playlists or segments and delivery stays on your existing CDN.

Asset sources must match the origin of the video URLs your player requests, before any redirects. For example, if the playlist URL is https://media.example.com/vod/stream.m3u8 and it redirects to https://edge.example.com/vod/stream.m3u8, you must allowlist https://media.example.com.

To add or change allowlisted site origins or asset sources, contact Sudden and include every environment you plan to use (production, staging, and local development).

Rotating a client ID without downtime

To rotate a client ID without downtime, keep an overlap window where both the old and new client IDs are valid.

  1. Ask Sudden to create a new client ID and allowlist the same site origins and asset sources as the old one.
  2. Deploy the new client ID in your app.
  3. Keep the old client ID active until the rollout is complete across all pages and caches.
  4. Ask Sudden to remove the old client ID once you no longer see traffic from it.
Last updated on