Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

Voice React Native SDK


Twilio Programmable Voice SDK for React Native allows you to add voice-over-IP (VoIP) calling into your React Native apps. Please check out the following if you are new to Twilio's Programmable Voice or React Native.

(information)

Info

For step-by-step instructions to get up and running with the React Native SDK for Programmable Voice, check out the reference app on github(link takes you to an external page).


How it Works

how-it-works page anchor
Mobile Voice SDK Diagram: Your mobile app connects to Twilio.

_10
yarn add @twilio/voice-react-native-sdk

Using this method, you can import the Voice SDK using ES Module or TypeScript syntax.


_16
import { Voice } from '@twilio/voice-react-native-sdk';
_16
_16
// getAccessToken should fetch an AccessToken from your backend
_16
const token = getAccessToken();
_16
const voice = new Voice();
_16
_16
// Allow incoming calls
_16
await voice.register(token);
_16
_16
// Handle incoming calls
_16
voice.on('callInvite', (callInvite) => {
_16
callInvite.accept();
_16
});
_16
_16
// Make an outgoing call
_16
const call = await voice.connect(token, params);

The Twilio Voice React Native SDK is open source. Check out our repository(link takes you to an external page) if you want to install from Github or build it locally.


Developer tools and configuration options for Programmable Voice(link takes you to an external page) can be found in the Programmable Voice Dashboard(link takes you to an external page). Use the console to create TwiML apps, update push credentials, view logs, and much more.


Rate this page: