Contacts API

React Native 6 min min read Updated: Aug 03, 2026 Intermediate
Contacts API
Intermediate Topic 12 of 18

Contacts API

Accessing a device’s contact list allows React Native applications to implement features like friend invitations, phone number auto-complete, or contact syncing.

Installing a Contacts Library

bash npm install react-native-contacts

Requesting Contacts Permission

javascript import { PermissionsAndroid } from 'react-native'; await PermissionsAndroid.request(PermissionsAndroid.PERMISSIONS.READ_CONTACTS);

Fetching All Contacts

javascript import Contacts from 'react-native-contacts'; const contacts = await Contacts.getAll(); console.log(contacts);

Displaying Contacts in a List

javascript item.recordID} renderItem={({ item }) => {item.displayName}} />

Adding a New Contact

javascript await Contacts.addContact({ givenName: 'John', familyName: 'Doe', phoneNumbers: [{ label: 'mobile', number: '1234567890' }], });

Searching Contacts

javascript const results = await Contacts.getContactsMatchingString('John');

Respecting User Privacy

Always clearly explain to users why your app needs contact access before requesting the permission, and only request it when the feature requiring contacts is actually being used.

Conclusion

Integrating the Contacts API using react-native-contacts allows React Native applications to build features like friend invitations and contact-based search, while respecting user privacy through proper permission handling.

Get Newsletter

Subscibe to our newsletter and we will notify you about the newest updates on Edugators