big-gigabyte-89779
02/04/2026, 5:23 PMloud-crowd-60573
02/04/2026, 6:32 PMgentle-policeman-89141
02/05/2026, 8:34 AM<script
async
crossorigin="anonymous"
data-clerk-publishable-key="YOUR CLERK PUBLISHABLE KEY FROM CLERK DASHBOARD"
src="https://square-horse-61.clerk.accounts.dev/npm/@clerk/clerk-js@5/dist/clerk.browser.js"
type="text/javascript"
></script>
now you have access to clerk methods in the project, such as the sign in modal. you can ensure users cant use your content unless the user signs in.
regarding keeping the user data in sync with the bot. Clerk has 3 types of metadata, unsafe (write and read on front end) public (read on front end, no write, write using backend) and private (no read or write allowed on front end). when your user creates an account with you, you can set metadata for the user, such as name age business logic usage and limits.gentle-policeman-89141
02/05/2026, 8:36 AMwindow.botpress.on('customEvent', async (event) => { // Your listener logic goes here }gentle-policeman-89141
02/05/2026, 8:38 AM{"action": "check-user-usage"}gentle-policeman-89141
02/05/2026, 8:41 AMwindow.botpress.on('customEvent', async (event) => { if (event.action === 'check-user-usage' {await window.Clerk.reload (reload user data)
const publicMetadata = await window.Clerk.publicMetadata (get metadata json from clerk)
// then however you define usage, check it and decide next steps.
}}gentle-policeman-89141
02/05/2026, 8:42 AMgentle-policeman-89141
02/05/2026, 8:44 AMgentle-policeman-89141
02/05/2026, 8:45 AM