# Contacts Picker API — Progressive Web Apps: Offline, Installable Web Apps

Source: https://www.skillbyai.com/en/pwa/pwa-contacts-picker

> Let users pick contacts with the Contacts Picker API while keeping privacy, and detect support before using it.

## Contact access permission

The **Contacts Picker API** lets users choose which contacts to share with your app, which protects privacy. It is available mainly in Chrome on Android, so always feature-detect it.

## Access contacts

Use the Contacts Picker API to access device contacts with user selection.

```javascript
const contactsButton = document.getElementById('select-contact');
contactsButton.addEventListener('click', async () => {
  try {
    const [contact] = await navigator.contacts.select(['name', 'email'], { multiple: false });
    console.log('Selected contact:', contact);
  } catch (err) {
    console.error('Contacts Picker error:', err);
  }
});
```

Output:

```
User can select contacts from device; app receives selected contact info.
```
