Skip to main content
This guide covers how to set up your bots, agents, crawlers, and other automated systems to get licensed access to RSL-protected content. Use the SDK to obtain a license token for the content you want to access, then send that token in the request to the publisher.

Before You Start

You need a Supertab Connect customer account and a registered System representing your bot or agent.
  1. Create your account — sign up at customer-connect.supertab.co
  2. Register a System — in the dashboard, go to Systems → Create System and give it a descriptive name (e.g., “Production RAG Agent”, “News Indexer”)
  3. Generate credentials — on the System Details page, generate a client_id and client_secret
  4. Save your credentials — you will need both the client_id and client_secret to obtain license tokens
You also need:
  • The exact protected resource URL you want to access, for example https://publisher.com/premium/article-123
  • An active license agreement between your organization and the publisher

Acquire Licenses

  1. Your system identifies the exact URL it wants to access
  2. The SDK fetches and evaluates the publisher’s license.xml
  3. It finds the best matching content rule for the requested resource.
  4. The SDK then requests a license token for the appropriate content pattern from the License Server using your credentials.
  5. Send your license token as an Authorization: License <token> heade on subsequent requests.
1

Obtain a Token

Call obtainLicenseToken() for every page you wish to access.The SDK handles determining the licensing basis for you and manages token expiration.
import { SupertabConnect } from "@getsupertab/supertab-connect-sdk";

const CLIENT_ID = "...your customer system client_id...";
const CLIENT_SECRET = "...your customer system client_secret...";
const resourceUrl = "https://publisher.com/premium/article-123";

const accessToken = await SupertabConnect.obtainLicenseToken({
clientId: CLIENT_ID,
clientSecret: CLIENT_SECRET,
resourceUrl,
});
2

Present your License Token

Send the token in the Authorization header using the License scheme.
const response = await fetch("https://publisher.com/premium/article-123", {
headers: {
Authorization: `License ${accessToken}`,
},
});
Use License, not Bearer. The header scheme must match the expected RSL license token format.

Full Example

import { SupertabConnect } from "@getsupertab/supertab-connect-sdk";

const resourceUrl = "https://publisher.com/premium/article-123";

const accessToken = await SupertabConnect.obtainLicenseToken({
  clientId: process.env.SUPERTAB_CLIENT_ID!,
  clientSecret: process.env.SUPERTAB_CLIENT_SECRET!,
  resourceUrl,
});

const response = await fetch(resourceUrl, {
  headers: {
    Authorization: `License ${accessToken}`,
  },
});

if (!response.ok) {
  throw new Error(`Request failed with status ${response.status}`);
}

const content = await response.text();

TypeScript SDK

TypeScript-specific reference with CDN handler examples.

Open Licensing Protocol

Token acquisition, client authentication, and JWKS verification.