Skip to main content

Overview

An embed block frames a page you host inside a customer’s Custral workspace. Registering one takes three things from you: the origin Custral frames, the URL template it loads, and the scopes your page needs to read the workspace. Custral reviews that declaration, and a workspace admin accepts the scopes when they install your module. By the end of this page your block will be in review, and you will know what a workspace does to install it.
You need an approved provider first. See Become a provider.

Before you start

  • Serve the page over https:// from an origin you control, such as https://embed.acme.com.
  • Let Custral frame it. A Content-Security-Policy: frame-ancestors or X-Frame-Options header that blocks Custral renders your block as an empty box. The portal can check this for you (step 4).
  • Implement the handshake if you ask for scopes. Your page posts custral:ready and receives its token in reply. See Embed blocks.

1. Create the block

1

Open the provider portal

2

Click New embed block

On Overview, or New embed under Embeds.
3

Name it

Give it a Key (a stable handle such as acme.overview-panel), a name and icon, and a description. The name and description are what workspace members see in the block picker.
The block opens on its own page with three tabs: Block, Embed and Parameters.

2. Put it in a module

A workspace installs a module, and installing is where the admin is shown the scopes your blocks ask for. Put every embed that requests scopes in one.
1

Create a module

In Modules, click Create Module and give it a key, a name and a description, e.g. “Acme panels”. A new module starts Private.
2

Assign the block

Back on the block’s Block tab, pick the module and click Save Settings.
Custral decides whether a module is listed. The module’s page states where it stands, and there is no status control in the portal:

3. Declare the embed

Open the block’s Embed tab. The template can use these placeholders. Each value is URL-encoded, and a value that isn’t available becomes an empty parameter.

Scopes an embed can ask for

An embed’s token reaches workspace data, never workspace credentials. So three scopes can never be declared: applications:manage and webhooks:manage (either would let your page mint a permanent key) and widget:identify (it vouches for who a customer’s visitors are). The token is accepted by /v1. Ask for the least you need. The installing admin sees the list, and the token is further narrowed to what the viewer can already do: a read-only member gets a token that cannot write.

4. Check it, then submit

1

Read the resolved URL

Once the declaration is valid, What Custral will actually request shows your template filled in with obviously fake ids. This is the line your reviewer reads.
2

Click Check my site allows framing

Custral requests the page and reads its framing headers. Your site refuses to be framed means it would render as an empty box; allow Custral as a frame ancestor and check again. Couldn’t tell is not a refusal and does not block review.
3

Click Save and submit for review

The block’s state changes to In review.

Review

A Custral reviewer answers three questions about the declaration:
  1. Does the origin belong to your provider?
  2. Are the scopes plausible for what the block does?
  3. Can the URL template resolve anywhere other than the declared origin?
The block’s page and the portal Overview show where it stands:

What changes after approval

How a workspace installs it

1

The admin opens Settings → Integrations

Your module is listed on the Modules tab once Custral has listed both your provider and the module.
2

They click Install Module and review your scopes

An Install <module name> prompt lists what your blocks can read. A module whose blocks request no scopes installs straight through.
3

Members add your block to a page

It appears in the block picker alongside Custral’s own blocks.
Uninstalling the module stops every token your blocks were handed at once, not when they expire.

Troubleshooting