bonuz SDK
integrate bonuz login in minutes
One-tap, self-custodial login and Engagement-ready entitlements, with gas sponsored flows on core actions.
Give users a normal login and return a user-owned identity. The bonuz SDK drops into any web/app stack; your product stays exactly as it is. When you want verifiable passes, vouchers, certificates or tickets, call one helper and bonuz handles the Engagement, sponsorship rules and verification.
Quickstart (any HTML page)
<script type="module" src="https://bonuz.id/sdk/v1/bonuz.js" data-project="bz_…"></script>
<div data-bonuz-login></div>
<script>
window.addEventListener('bonuz:login', async (e) => {
const { id, handle, name, walletAddress } = e.detail.user
const token = await window.bonuz.getFreshToken()
// send the token to your server and verify it there
})
</script>Get the bz_ key and allow your domains at app.bonuz.market/developers. React, token verification, CSP and WordPress are covered in the integration guide.
What's inside
Script tag
One module script from bonuz.id plus one div. The button renders in a shadow DOM; window.bonuz and three events give you the user and the token.
React provider
BonuzAuthProvider, useBonuzAuth and ConnectButton from @bonuz/sdk/auth/react and @bonuz/sdk/components for teams building in React.
Token check
Send the token to your server and ask the bonuz API who it belongs to. One GET, no key material to manage.
Gas sponsorship policy
Allowlisted contracts/methods with per-wallet/day caps, campaign caps, cooldowns, and anti-abuse checks before sponsor. Users can always transact themselves.
{
"campaignId": "summer-2025",
"chainId": 8453,
"contracts": [
{"address":"0xAbC...", "methods":["mintPass","redeemVoucher","verifyTicket"]}
],
"perWalletDailyCap": 3,
"campaignCap": 10000,
"cooldownSeconds": 3600,
"denyIfRiskScoreAbove": 0.8
}