Skip to content
Docs and guides

Help Center

Step-by-step guides for every setting in App Studio.

Native Contacts

Updated

Pick contacts for referrals and gift orders.

Enable a native plugin, configure its settings, then rebuild and install the app.
Native plugin changes require a new build. Follow this guide for the exact settings and supported methods.View full size
  • JavaScript: window.AppSorcerer.contacts
  • Plan: Plus (premium) — included on plans with premium plugins, and you can try it free for 14 days
  • Platforms: Android apps today. iOS support arrives with iOS builds (coming soon).
  • Android permissions: READ_CONTACTS

Turn the plugin on in App Studio → Plugins, fill in its settings, then rebuild your app. Websites call it through the JavaScript bridge.

Settings

Studio labelTypeDefaultNotes
Share these fields with the websitelist["Name", "Phone", "Email"]options: Name, Phone, Email, Address

Setup

Nothing to configure beyond the fields to share. Only the fields enabled in Share these fields with the website (Name, Phone, Email, Address) are ever returned, even if the page asks for more.

JavaScript API

Every method returns a Promise. Call it as await AppSorcerer.contacts.<method>(args).

MethodArgumentsResolves with
pick{ fields?: ('Name' | 'Phone' | 'Email' | 'Address')[] }{ id, name, givenName, familyName, phones: [{ number, type }], emails: [{ address, type }], addresses: [{ formatted, street, city, region, postcode, country, type }] }
hasPermission–{ granted }
requestPermission–{ granted }

pick asks for READ_CONTACTS and opens the system contact picker. If the user declines the permission, a phone picker (or email picker) opens instead; it needs no permission and returns only the picked entry, with partial: true.

Errors

Rejections carry error.code: canceled, permission_denied, not_found, read_failed, busy, unavailable, invalid_args, unknown_method.

Example

JavaScript
const friend = await AppSorcerer.contacts.pick({ fields: ['Name', 'Phone'] });
document.querySelector('#gift-name').value = friend.name;
document.querySelector('#gift-phone').value = friend.phones[0]?.number ?? '';
Was this helpful?