API in Capabilities
Contact Picker API
Published Updated
The navigator.contacts.select() method asks the user to choose contacts and the details to share with a page. The user agent presents the picker, and the page receives one-off access to the selected records instead of standing access to the address book.
The api.Navigator.contacts and api.ContactsManager compatibility data records support from Chrome 80 on Android M (Android 6) and Android WebView 80. It records no support in desktop Chrome, Edge, Firefox, or macOS Safari; iOS 14.5 Safari has the Contact Picker API preference, and Samsung Internet 14.0 exposed an implementation that failed when opening the selector before removal in 22.0. MDN classifies the API as experimental and outside Baseline. The Contact Picker compatibility data carries the browser rows and their verification date.
Syntax
Section titled “Syntax”The API exposes select() and getProperties() through navigator.contacts on a [SecureContext] interface in Window. select() must run in a top-level traversable with transient user activation. The specification defines getProperties() without those two checks.
| Operation | Signature | Result |
|---|---|---|
| Pick contacts | navigator.contacts.select(properties, options?) |
Promise<sequence<ContactInfo>> |
| List available fields | navigator.contacts.getProperties() |
Promise<sequence<ContactProperty>> |
navigator.contacts.select(properties)navigator.contacts.select(properties, options)navigator.contacts.getProperties()Calling select() consumes transient activation before it opens the picker. The picker UI must display the requesting origin, identify the requested properties, let the user select individual contacts, and offer a cancel path. Cancellation returns an empty sequence. When options.multiple is false, the UI allows one contact to be picked.
getProperties() reports the fields offered by the contact source chosen by the user agent. Use its result to build the array passed to select(); the specification rejects a selection request when that array contains a field outside the source’s supported set.
Parameters
Section titled “Parameters”select() takes a sequence of contact fields and an optional selection dictionary. The Contact Picker specification defines the following values.
| Parameter | Type | Required | Meaning |
|---|---|---|---|
properties |
sequence<ContactProperty> |
Yes | Requested fields. The enum contains "address", "email", "icon", "name", and "tel". |
options.multiple |
boolean |
No | Defaults to false. Set it to true to allow more than one selected contact. |
Chrome documents name, email, and tel in Chrome 80 on Android M or later, with address and icon requiring Chrome 84 or later. Query getProperties() instead of assuming that every contact source supplies each enum value.
The returned ContactInfo dictionary uses sequences because a selected contact can have more than one value for a field. A dictionary includes the fields requested by the caller. ContactAddress represents each physical address.
| Member | Type | Content |
|---|---|---|
name |
sequence<DOMString> |
Names from the selected contact |
email |
sequence<DOMString> |
Email addresses from the selected contact |
tel |
sequence<DOMString> |
Telephone numbers from the selected contact |
address |
sequence<ContactAddress> |
Physical addresses; the interface includes country, addressLine, region, city, and postalCode. W3C’s 2021 activity records the change that transplanted PaymentAddress into ContactInfo. |
icon |
sequence<Blob> |
Contact images represented by Blob objects |
Chrome documents an empty sequence when the selected contact lacks a requested value or the user chooses not to share that value. The picker therefore does not tell the page which of those conditions produced the empty sequence. Chrome also documents that labels and other semantic information attached to contact fields are dropped.
Exceptions
Section titled “Exceptions”The select() algorithm checks the calling context, user activation, picker state, and requested properties before presenting any UI.
| Exception | Condition |
|---|---|
InvalidStateError |
The caller is not a top-level traversable, a picker is already showing for the navigable, or launching the picker or reading its contact source fails. |
SecurityError |
The relevant global object has no transient activation. |
TypeError |
properties is empty or includes a property that the contact source does not support. |
Chromium’s implementation reports a different exception when its Android selector cannot open: it rejects with TypeError: Unable to open a contact selector. Code that recovers from picker failures should handle the rejected promise rather than branching only on the exception names in the specification. A delayed callback can run after transient activation expires and then fail the implementation’s activation check, so call select() as soon as practical within the activation handler.
Examples
Section titled “Examples”Both examples keep a form path available. Feature detection can decide which control to show, but a supported implementation can still reject or return a contact without the requested value.
Picking one email with a manual fallback
Section titled “Picking one email with a manual fallback”Place a button and an <input type="email"> in the document. Test 'contacts' in navigator && 'ContactsManager' in window, then call select() directly from the click handler. Treat an empty result as cancellation, and reveal the input after a missing email or rejected promise.
const pickButton = document.querySelector('#pick-recipient');const manualField = document.querySelector('#recipient-email');
const supported = 'contacts' in navigator && 'ContactsManager' in window;pickButton.hidden = !supported;manualField.hidden = supported;
pickButton.addEventListener('click', async () => { try { const [contact] = await navigator.contacts.select(['name', 'email']); if (!contact) return; // user cancelled const email = contact.email[0]; if (!email) { manualField.hidden = false; // contact had no email address return; } manualField.value = email; } catch (err) { console.error(`${err.name}: ${err.message}`); manualField.hidden = false; }});The input is the recovery path on unsupported browsers and after an error. Checking contact.email[0] also covers a contact whose email field is absent or withheld, as described by Chrome’s Contact Picker documentation.
Recovering when requested properties are unavailable
Section titled “Recovering when requested properties are unavailable”Ask the contact source which values it supports before opening the picker. This function filters a desired list, passes multiple: true, returns null when the API or usable fields are absent, and leaves the caller to render its attendee form. A missing first value would otherwise produce undefined.
async function pickAttendees(wanted = ['name', 'tel', 'icon']) { if (!('contacts' in navigator && 'ContactsManager' in window)) { return null; // caller shows its own attendee form } const available = await navigator.contacts.getProperties(); const props = wanted.filter((p) => available.includes(p)); if (props.length === 0) return null;
const contacts = await navigator.contacts.select(props, { multiple: true }); return contacts.map((c) => ({ name: c.name?.[0] ?? '', tel: c.tel?.[0] ?? '', avatar: c.icon?.[0] ? URL.createObjectURL(c.icon[0]) : null, }));}Call this function from a user-activation handler because select() consumes transient activation. A null result tells the caller to display its form; an empty array means the picker returned no selected contact. Catch a rejection at the call site and show the same form, as the first example does.
See also
Section titled “See also”- Contact Picker API browser support
- Web Share API
- Payment Request API
- Contact Picker API (w3.org)
- A contact picker for the web (developer.chrome.com)
- Chrome Platform Status: Contacts API (chromestatus.com)
Specifications
| Specification | Status |
|---|---|
| Contact Picker | WICG draft |
| Contact Picker API: select() method | W3C draft |
- Legend
- Yes
- Partial
- Flag
- No
- Unknown
| Browser / Platform | Support | Versions | Confidence | Source | Notes |
|---|---|---|---|---|---|
| Chrome (Desktop)# | No | — | high | source | 1 |
| Chrome (Android)# | Yes | 80 | high | source | — |
| Edge (Desktop)# | No | — | high | source | 23 |
| Firefox (Desktop)# | No | — | high | source | 4 |
| Firefox (Android)# | No | — | high | source | 56 |
| Safari (macOS)# | No | — | high | source | 7 |
| Safari (iOS)# | Flag | 14.5 | high | source | 8 |
| Samsung Internet# | No | removed in 22.0 | high | source | 910 |
| WebView (Android)# | Yes | 80 | high | source | 11 |
- No Chrome support is recorded in browser-compat-data.
- No Edge support is recorded in browser-compat-data.
- Derived by browser-compat-data mirroring from Chrome.
- Implementation tracking: https://bugzil.la/1756767.
- Implementation tracking: https://bugzil.la/1756767.
- Derived by browser-compat-data mirroring from Firefox.
- No Safari support is recorded in browser-compat-data.
- Behind the `Contact Picker API` preference.
- Was supported in Samsung Internet from 14.0 until it was removed in 22.0.
- This API was exposed but failed upon opening a contact selector.
- Derived by browser-compat-data mirroring from Chrome Android.
Cite this table
Contact Picker compatibility data — OpenPWA · Verified 2026-10-03 · CC BY 4.0 · JSON
When reusing compatibility data, keep the attribution, identify your changes and check each row’s original source. This citation excludes market-share and reach figures, which use CC BY-SA 4.0.