Aksa BridgeBridge Methods

Bridge Methods

Every method your page can call, the scope it needs and who may use it.

Use aksa.request({method, params}) or the helpers in aksa-mini.js.

MethodScopeTier
context.get (appId, your pseudonymous userId, actionId, roomId, locale, source)openany
storage.get / storage.set (per-app, on device)openany
share.open, clipboard.write, ui.closeopenany
actions.checkInactions.checkinbasic
calendar.addEventcalendar.writebasic
profile.getprofile.basicverified
profile.getEmailprofile.emailverified (needs explicit user consent)
location.getCurrentlocation.foregroundverified
health.readhealth.readverified
contacts, photos, notificationstheir scopesverified
permissions.request (ask for your declared scopes up front)openany
stars.spend (Stage 4 payment hook - requests Stars micro-payment or gift from user)openany

How permissions work:

  • The user is asked the first time you call each scope, and the answer is remembered.
  • You can only call scopes you declared in the manifest.
  • A scope added in a new version triggers a full review.
  • stars.spend is the Stage 4 payment hook (MiniKit / Telegram Stars model). It prompts the native Aksa wallet confirmation, transfers Stars from the user's purchase balance to the creator's balance, and writes to the immutable ledger.
  • To ask up front instead of on first use: aksa.request({ method: "permissions.request", params: { scopes: [...] } }), or AksaMini.requestPermissions(scopes) from aksa-mini.js. You get one answer per scope: granted, denied (remembered - the user can only change it in Settings > Connected Apps), or unavailable (the phone cannot offer it, for example an iOS-restricted native scope). A host without the method answers an unknown-method error; AksaMini.requestPermissions then resolves supported: false, so gate features on the answers, not on the call succeeding. Only scopes in your manifest's bridge.scopes can come back granted.

When context.get returns an actionId, you are inside an Action. Do not ask the user to "link an Action". The example runtime hides that box automatically.

Ready to ship?

Submit An App