For the complete documentation index, see llms.txt. This page is also available as Markdown.

Protect URL Personalization Data with Signed Tokens

Use a signed token when personalization data must travel in a URL and the Blings landing page must reject values that were changed or created by an untrusted sender. The sending system signs the data with a private key, and the landing page verifies the signature with the matching public key before passing the data to the Blings player.

This pattern is independent of the CRM. The sender can be a CRM server-side function, an automation webhook, middleware, or your application backend, as long as it can create an ECDSA signature.

Before you begin

You need:

  • The Dynamic Data field names from your project in Platform Integration.

  • A trusted sender-side environment that can securely store a private key and use the Web Crypto API or an equivalent ECDSA library.

  • Control of the landing page code, or coordination with Blings to configure the public key on a Blings-hosted landing page.

  • A short token lifetime that fits the campaign journey.

Never place the private key in an email template, browser script, URL, mobile app, or public repository. Only the public key belongs on the landing page.

How the token works

  1. The sender builds a JSON payload containing an audience, issue time, expiration time, and the data mapped to the Blings project.

  2. The sender converts the JSON to Base64URL and signs that encoded value with the private key.

  3. The CRM places the resulting payload.signature token in the landing-page URL.

  4. The landing page verifies the signature with the public key.

  5. The landing page also checks the token audience and expiration time.

  6. Only verified personalization data is passed to BlingsPlayer.create.

Generate a key pair once

Run this once in a secure administrative environment. Store the exported private key in your secret manager and provide only the public key to the landing page.

Each environment should have its own key pair. Do not reuse the example output from another organization or publish the generated private key.

Transfer the generated private JWK directly into your secret manager, then clear it from the console and any temporary files.

Create the signed token on the sender side

The following JavaScript uses the standard Web Crypto API. Run it only in a trusted server-side environment. Replace the JWK placeholders with the private key generated for your environment.

The data object can contain any fields configured as Dynamic Data in the Blings project. It does not depend on a specific CRM:

Use your CRM's merge tags or automation fields to build personalizationData. Keep key handling and signing in the trusted sender-side component rather than the message template.

Verify the token on the landing page

The public key can verify signatures but cannot create them. Replace the JWK placeholders with the public key that matches the sender's private key.

After verification, pass the returned data to the player:

The sender and landing page must use the same:

  • ECDSA P-256 key pair

  • SHA-256 signature algorithm

  • ECDSA signature encoding: Web Crypto uses a 64-byte IEEE P1363 r || s signature for P-256

  • Base64URL encoding rules

  • URL parameter name, such as d

  • Audience value

  • Payload field names

CRM implementation options

Sender capability
Recommended implementation

CRM supports secure server-side JavaScript and secret storage

Create the token in the CRM's server-side function or automation step.

CRM can call a webhook but cannot safely store or use the key

Send the mapped fields to trusted middleware, then return the signed URL or token to the CRM.

CRM only supports merge tags in message templates

Do not put the private key in the template. Use middleware or a backend to create signed links before sending.

Blings hosts the landing page

Provide Blings with the public JWK, URL parameter name, audience, and payload field mapping. Keep the private JWK in your own trusted environment.

You host the landing page

Verify the token before passing payload.data to BlingsPlayer.create.

If the sender uses a signing library other than Web Crypto, confirm its ECDSA signature format. Many libraries default to ASN.1 DER. Configure or convert the output to the 64-byte IEEE P1363 format expected by the landing-page code, or update both sides to use the same format.

Security checklist

  • Store the private key in a secret manager and restrict which service can use it.

  • Use HTTPS for every landing-page URL.

  • Keep token lifetimes short and reject expired tokens.

  • Use a different audience for each experience or trust boundary.

  • Rotate keys according to your organization's security policy.

  • Treat the decoded payload as readable URL data even after its signature is verified.

  • Account for URL exposure through browser history, infrastructure logs, referrer data, link scanners, and analytics tools.

  • Remember that a valid token can be reused until it expires. Use a short lifetime, or a stateful server-side token exchange when a link must work only once.

  • Keep tokens small enough for the URL limits of your CRM, email security tools, browsers, and redirect services.

  • Test missing, expired, malformed, and modified tokens before launching the campaign.

If the payload itself must remain confidential, use a server-side token exchange or an encryption design reviewed by your security team. A public-key signature alone does not hide the data.

Last updated