Build

Scopes

Scopes are the capabilities your app may use. Declare them in the manifest, get them approved, and ask for the ones that need consent right before you use them.

Last updated: November 7, 2026 · Browser SDK 1.6.0 · Bridge protocol 1.2

How scopes work#

  1. Declare every scope your app may use in the manifest's scopes. Ask for as few as possible.
  2. Approval: the SALOPHA team reviews and approves each one. Undeclared or unapproved scopes answer scope_denied.
  3. Consent: some scopes show the user a sheet once, some every time, some never (the operating system may still ask). Ask lazily with requestScope(scope) right before the feature that needs it, and handle granted: false gracefully.
  4. Revocation: users can revoke any scope in Settings › Mini apps. See When consent is revoked.
import { MiniAppScopes } from "@salopha/mini-app-sdk";
const r = await app.requestScope(MiniAppScopes.addressesRead); // { scope, granted, oneTime?, alreadyGranted? }
if (r.granted) showAddresses(await app.getAddresses());

Reference#

ScopeThe user seesGives your app
profile.basicA sheet onceName, photo, language: getIdentity() and the server profile
profile.phoneA sheet onceThe verified phone: getPhoneNumber() and the server profile
profile.phone.requestEvery timeThe phone for this use only
location.currentA sheet oncegetLocation(), the page's navigator.geolocation in a phone web view
location.preciseEvery timegetLocation({ precise: true })
addresses.readA sheet onceAll saved addresses: getAddresses(), server me/addresses. Not needed for pickAddress().
transactions.readA sheet onceThe user's transactions with your app: getTransactions(), server me/transactions
camera.pickEvery timepickImage({ source: "camera" })
media.pickA sheet oncepickImage({ source: "gallery" })
file.pickA sheet oncepickFile() (a plain <input type=file> works without the bridge)
contacts.pickEvery timepickContact()
qr.scanA sheet oncescanQr()
notifications.serviceA sheet onceYour server may notify the user; requestNotifications() asks
share.objectA sheet onceshareObject(), sendToChat() and chat actions
chat.openA sheet onceopenChat()
business.profile.readA sheet onceopenBusiness() and business profiles
biometric.authNo sheetauthenticateBiometric()
clipboard.writeNo sheetcopyText()
share.systemNo sheetshareText()
maps.openNo sheetopenMaps()
phone.callNo sheetcallPhone()
url.openNo sheetopenUrl()
storage.localNo sheetstorage.get/set/remove/clear
shortcut.createNo sheetcreateShortcut() (also needs runtime.allowShortcut)
transaction.publish.serverNever (server only)Publishing transaction events from your server
business.binding.manageNever (server only)Connecting your merchants to SALOPHA businesses

"No sheet" scopes still have to be declared and approved; the device may show its own prompt (for example biometrics). Server-only scopes can never be requested from the page: the SDK refuses them with method_not_allowed.

Choosing the user's address#

pickAddress() needs no scope: the user picks one saved address (or adds one), and that choice is the consent. Use it for any delivery or visit address. Ask for addresses.read only when you really need the whole list.

Privacy rules SALOPHA enforces#

  • The profile photo is shared only when the user shows it to everyone.
  • An automatic grant of profile.phone includes the number only when the user shows it to everyone; otherwise your app must ask, and the user's explicit consent always wins.
  • Never cache personal data beyond your session.