Skip to content

@capgo/capacitor-android-sms-retriever

Read one app-targeted verification SMS without SMS permissions and request SIM phone number hints on Android.

@capgo/capacitor-android-sms-retriever wraps Google Play services SMS Retriever and Phone Number Hint APIs for Android-only Capacitor verification flows.

The plugin lets your app listen for a single verification SMS addressed to your app without requesting SMS permissions. It can also show Android’s native Phone Number Hint UI so users can choose a SIM-based phone number without typing it manually.

  • startWatch - Start a five-minute SMS Retriever watch for one verification SMS.
  • stopWatch - Stop the active SMS Retriever watch.
  • getHashString - Read the 11-character app hash used in verification SMS messages.
  • getPhoneNumber - Open Android Phone Number Hint and return the selected phone number.
  • smsReceived - Listen for the retrieved verification SMS.
  • smsRetrieverTimeout - Listen for the five-minute timeout.
  • smsRetrieverError - Listen for runtime errors from Android or Google Play services.
PlatformSupport
AndroidSupported
iOSUnsupported stub
WebUnsupported stub
MethodDescription
startWatchStart listening for one verification SMS.
stopWatchStop the active watch.
getHashStringReturn the 11-character app hash.
getPhoneNumberShow Phone Number Hint and return the selected number.
addListener('smsReceived', ...)Receive the retrieved SMS payload.
addListener('smsRetrieverTimeout', ...)Handle timeout events.
addListener('smsRetrieverError', ...)Handle retriever errors.
getPluginVersionReturn the native plugin version.

This reference is synced from src/definitions.ts in capacitor-android-sms-retriever.