Skip to content

Protected actions

Purpose

Authorize paid or gated work across portfolio products with short-lived, bound tokens.

How it works

Portfolio products create an action session, MKP authenticates the user, reserves credits, and issues a short-lived authorization bound to site/user/action/resource.

Trusted servers verify, perform work, then capture or release the reservation.

Live prototype

Log in with the seeded demo user (has credits). Starts action docs.sample_download on the docs ClientSite.

Start a protected action session

Calls POST /api/v1/actions/sessions/ with site key + session cookie.

Code to paste

<script src="https://YOUR_PLATFORM/sdk/v1/mkp.js"></script>
<script>
  MKP.init({ baseUrl: "https://YOUR_PLATFORM", siteKey: "pk_..." });
</script>
<button
  data-mkp="protected-action"
  data-action="docs.sample_download"
  data-resource-id="resource-123">
  Start action
</button>