Skip to main content

Share libraries

This page shows you how to serve one of your libraries to another site.

Sharing runs one way, and a whole library is the unit: you never share a pattern on its own. This site is the origin, holding the libraries and issuing the tokens that open them. The receiving site connects with a token and browses whichever libraries it opens, patterns included.

Both sites need an active Unblock license, and only Administrators see this dialog.

Open the dialog

Open the Library modal, click Shared libraries in the header.

The Shared libraries dialog: Share URL, Public key and access tokens

Only your own libraries can be shared. The official catalog, and libraries you connected from elsewhere, are not re-served.

Connection details

Two values, both with a copy button:

FieldWhat it is
Share URLThe endpoint consumers point at: https://your-site.com/wp-json/unblock/v1/library/shared
Public keyOptional. A developer on the receiving site can use it to check that patterns really come from you and arrived untouched. See Trust tiers.

The Share URL and a token are all the other site needs.

Issue an access token

Click Add access token.

An access token row open on its Name and Libraries fields

FieldWhat it does
NameFor you — usually the site or client it's for
LibrariesWhich of your libraries this token opens. Leave it empty and the token opens all of them, including ones you create later.

The token is generated on save. Copy it with the button on the row.

Manage a token

Each row carries three actions:

  • Pause / Resume — cuts access without deleting the token; connected sites stop pulling and keep what they cached
  • Regenerate — issues a new token. Every site using the old one is cut off immediately.
  • Delete — removes the token for good
Common mistake

One token per site, not one token for everyone. A shared token can't be revoked for a single client: regenerating it cuts off every site using it. Issue a separate token per consumer and you can pause or delete just that one.

Selling access

The origin authorizes each pull by matching the presented token. Developers can replace that verdict with the unblock/library/share_access filter and plug in their own entitlement check: a membership, a subscription, a per-site quota.

Next steps